Sitecore remove previous versions on duplicating or copying item

Hi all,

When duplicating or copying an item in Sitecore, all the versions are copied to the new item as well. Sometimes this is unwanted behaviour, especially when the first version of the item was not part of the workflow. When you publish the item, the latest published state would be published (i.e. the non-workflow version)

A simple trick is to remove the previous versions of the item when duplicating or copying item. This is done by intercepting the uiCopyItems and uiDuplicateItem.
Note that for uiDuplicateItem, the Sitecore.Buckets.config aborts the pipeline before the original duplicate pipeline. To avoid this, we make sure our custom pipeline is triggered first before the bucket config.

Custom config patch:

Then we have a Sitecore extension helper to remove the previous versions:
DuplicateItem class:
CopyItem class:
And that's it. Note that I applied this to Sitecore 7.2 Update 5



I wish to show thanks to you just for bailing me out of this particular trouble.As a result of checking through the net and meeting techniques that were not productive, I thought my life was done.
Digital Marketing Training in Chennai

Digital Marketing Training in Bangalore
Digital Marketing Training in Pune


All the points you described so beautiful. Every time i read your i blog and i am so surprised that how you can write so well.
Click here:
python training institute in chennai
Click here:
python training in chennai


It's interesting that many of the bloggers to helped clarify a few things for me as well as giving.Most of ideas can be nice content.The people to give them a good shake to get your point and across the command

Blueprism training in Chennai

Blueprism training in Bangalore

Blueprism training in Pune


Awesome..You have clearly explained …Its very useful for me to know about new things..Keep on blogging..

Data Science Training in Chennai
Data science training in bangalore
Data science online training
Data science training in pune


Nice tips. Very innovative... Your post shows all your effort and great experience towards your work Your Information is Great if mastered very well.
java online training | java training in pune

java training in chennai | java training in bangalore


You made such an interesting piece to read, giving every subject enlightenment for us to gain knowledge. Thanks for sharing the such information with us

angularjs Training in chennai
angularjs-Training in pune

angularjs-Training in chennai

angularjs Training in chennai

angularjs-Training in tambaram


I likable the posts and offbeat format you've got here! I’d wish many thanks for sharing your expertise and also the time it took to post!!
angularjs Training in bangalore

angularjs Training in btm

angularjs Training in electronic-city

angularjs online Training

angularjs Training in marathahalli


Thank you so much for sharing such an amazing blog. Visit for
Website Development Company in Delhi


I am really enjoying reading your well-written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work.
Hadoop course in Marathahalli Bangalore
DevOps course in Marathahalli Bangalore
Blockchain course in Marathahalli Bangalore
Python course in Marathahalli Bangalore
Power Bi course in Marathahalli Bangalore


Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article. thank you for sharing such a great blog with us.
python training in velachery | python training institute in chennai


Good job in presenting the correct content with the clear explanation. The content looks real with valid information. Good Work

DevOps is currently a popular model currently organizations all over the world moving towards to it. Your post gave a clear idea about knowing the DevOps model and its importance.

Good to learn about DevOps at this time.

devops training in chennai | devops training in chennai with placement | devops training in chennai omr | devops training in velachery | devops training in chennai tambaram | devops institutes in chennai | devops certification in chennai


I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly.
SEO Training Institute in Chennai
SEO training course
Best SEO training in chennai
Digital Marketing Training
Digital marketing training institute in chennai
Digital marketing classes in chennai


Do you mind if I quote a couple of your posts as long as I provide credit and sources back to your blog? My blog is in the same niche as yours
nebosh course in chennai


Wonderful post. Thanks for taking time to share this information with us.

Article submission sites
Guest posting sites


Very nice post. I definitely appreciate this site. Thanks for sharing...visit for
web development company in noida


بسم الله الرحمن الرحيم نحن فى شركة الكمال نقوم بجميع خدمات نقل العفش والاساس بافض الطرق تحت اشراف

فريق كبير مدرب على اعلى مستوى من المستويات مع الفك والتركيب
شركة نقل اثاث بالطائف
شركة نقل اثاث بجازان
شركة نقل اثاث بحائل
شركة نقل اثاث ونقل عفش بحائل
والسلامة عليكم ورحمة الله وبركاته


Outstanding blog thanks for sharing such wonderful blog with us ,after long time came across such knowlegeble blog. keep sharing such informative blog with us.

machine learning classroom training in chennai
python machine learning training in chennai
machine learning training in velachery
top institutes for machine learning in chennai


Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information..
Microsoft Azure online training
Selenium online training
Java online training
Java Script online training
Share Point online training


Thank you for this post. Thats all I are able to say. You most absolutely have built this blog website into something speciel. You clearly know what you are working on, youve insured so many corners.thanks
devops online training

aws online training

data science with python online training

data science online training

rpa online training


Such an great and nice blog, Thank you for sharing this wonderful post.

ExcelR Data Science Course in Bangalore


Nice information, valuable and excellent design, as share good stuff with good ideas and concepts, lots of great information and inspiration, both of which I need, thanks to offer such a helpful information here.
ExcelR Data science courses in Bangalore


Post a Comment