08 Jul 2011
03 Jul 2013
Link to this post
I created a module using the Module builder. Now I'm trying to programmatically add content items but I want to prevent duplicates, kind of the same way that you cannot add 2 content items with the same url if you add content from the content menu. Is there a best practice to accomplish this or do I need to loop through the collection and check manually?
When I programmatically add duplicate content items, set the same UrlName, call SaveChanges(), call Publsih() from ILifecycleDataItem and call SetWorkflowStatus() it doesn't throw any errors and then I end up with duplicates.