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:


Sitecore.buckets.config:
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

HTH,
Andreas

65 comments

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

Reply

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

Reply

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

Reply

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

Reply

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

Reply

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

Reply

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

Reply

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

Reply

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

Reply

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

Reply

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

Reply

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

Reply

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

Reply

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

Article submission sites
Guest posting sites

Reply

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

Reply


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

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

Reply

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

Reply

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

Reply

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

Reply

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


ExcelR Data Science Course in Bangalore

Reply

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

Reply

Hi buddies, it is great written piece entirely defined, continue the good work constantly.
Data Science Course in Pune

Reply

i am for the first time here. I found this board and I in finding It truly helpful & it helped me out a lot. I hope to present something back and help others such as you helped me.
data science course malaysia

Reply

I was just browsing through the internet looking for some information and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject. Bookmarked this page, will come back for more.
data science course in singapore

Reply

Attend The Digital Marketing courses in bangalore From ExcelR. Practical Digital Marketing courses in bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Digital Marketing courses in bangalore.
Digital Marketing Courses in Bangalore

Reply


Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.
Great post, Thanks for sharing.

Reply

Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us

You will get an introduction to the Python programming language and understand the importance of it. How to download and work with Python along with all the basics of Anaconda will be taught. You will also get a clear idea of downloading the various Python libraries and how to use them.
Topics
About ExcelR Solutions and Innodatatics
Do's and Don’ts as a participant
Introduction to Python
Installation of Anaconda Python
Difference between Python2 and Python3
Python Environment
Operators
Identifiers
Exception Handling (Error Handling)
Excelr Solutions

Reply

I like viewing web sites which comprehend the price of delivering the excellent useful resource free of charge. I truly adored reading your posting. Thank you!
data analytics course malaysia

Reply

Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!
data analytics course malaysia

Reply


Really very happy to say,your post is very interesting to read.I never stop myself to say something about it.You’re doing a great job.Keep it up.
One data science
One Machine Learning

Reply


Really very happy to say,your post is very interesting to read.I never stop myself to say something about it.You’re doing a great job.Keep it up.
One data science
One Machine Learning

Reply

Awesome post sir,
really appreciate for your writing. This blog is very much useful...
Hi guyz click here Digital Marketing Training in Bangalore to get the best knowledge and details and also 100% job assistance hurry up...!!

DO NOT MISS THE CHANCE...

Reply

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
blue prism Training in Electronic City

Reply

I love your article so much. Good job
ExcelR is a global leader delivering a wide gamut of management and technical training over 40 countries. We are a trusted training delivery partner of 350+ corporate clients and universities across the globe with 28,000+ professionals trained across various courses. With over 20 Franchise partners all over the world, ExcelR helps individuals and organisations by providing courses based on practical knowledge and theoretical concepts.

Excelr Solutions

Reply

Sehar News is a wide area that envelops pakistan news , kashmir news , International News, Sports News, Arts and
Entertainment News, Science and Technology, Business News, latest news in urdu , Education News and today news Columns.
The perusers can snatch most recent urdu news dependent on different political and get-together
occurring in the nation. Sehar News covers the most recent and up and coming news features, Read today urdu news and top stories from different backgrounds and carries it to the viewers



wanna know latest pakistan news ? click pakistan news and know more.

Read latest news in urdu and know more .

read all the latest urdu news in this site.

you dont know ? about today news click here and know more.

know the current news of kashmir news check here.

read all about today urdu news and gain knowledge.

Reply

Established in 2016 SSDWebHosting.net is providing top quality domain and hosting services worldwide to
our valued customers and trying to play a little role in their success.We offer about 500 distinctive gTlds and ccTlds
to look over which includes old master class gTlds like .com, .net and .org, in addition this we also offer newly launched Tlds
like .xyz, .online, .master, .office, .on, .top and .club. We can assist you with choosing the best fitting name. Let's bring your
thought or business on the web. visit this site https://SSDWebHosting.net/ to know more.


Do you wanna buy SSD Web Hosting visit here.
Find best Cheap Web Hosting here.

Reply

punaise des lits sont l'un des problèmes les plus difficiles à éliminer rapidement.
La meilleure solution, de loin, pour lutter contre punaise des lits est d'engager une société de lutte antiparasitaire.
ayant de l'expérience dans la lutte contre punaise des lits . Malheureusement, cela peut être coûteux et coûteux.
au-delà des moyens de beaucoup de gens. Si vous pensez que vous n'avez pas les moyens d'engager un professionnel
et que vous voulez essayer de contrôler traitement des punaises de lit vous-même, il y a des choses que vous pouvez faire. Avec diligence
et de patience et un peu de travail, vous avez une chance de vous débarrasser de punaises de lit paris dans votre maison.


Vous voulez supprimer punaise des lits de votre maison ?
se débarrasser de punaises de lit paris cocher ici
nous faisons traitement des punaises de lit de façon très professionnelle.

Reply

In our culture, the practice of treatment through various burn fat herbs and
spices is widely prevalent. This is mainly due to the reason that different burn fat herbs grow in great abundance here. In addition to the
treatment of various ailments these herbs prove beneficial in Healthy Ways To Lose Weight
, especially for those who want to burn fat herbs

we live in a world where diseases and their prevalence has gone off
the charts. With the ever-growing incidences of illnesses and
sufferings, one finds themselves caught up in a loop of medications
and doctors’ visits. We, at https://goodbyedoctor.com/ , aim to find solutions for
all your health-related problems in the most natural and harmless ways.
We’re a website dedicated to providing you with the best of home
remedies, organic solutions, and show you a path towards a healthy,
happy life. visit https://goodbyedoctor.com/
this site daily to know more about health tips and beauty tips.

Reply

Ez battery reconditioning reviews - You can now easily revive your old batteries with this
Ez battery reconditioning pdf which provides step by step instructions for recondition a battery.
Ez battery reconditioning blog publishes how Ez battery reconditioning programs works
and where buy Ez battery reconditioning step by step program online after this
candid Ez battery reconditioning reviews. Battery reconditioning course is newbie friendly. It may help you
set up and run your own battery reconditioning business by learning this skill at home.
How to recondition a battery with Ez battery reconditioning .
Have you heard about Tom Ericson's Ez battery reconditioning reviews technique and
are wondering whether it is possible or not. visit https://ezbatteryreconditioninginfo.com/ this site to know more. Thank you every one.

Reply

Nice Post...I have learn some new information.thanks for sharing.
Click here for ExcelR Business Analytics Course

Reply

I like you article. if you you want to saw Sufiyana Pyaar Mera Star Bharat Serials Full
Sufiyana Pyaar Mera

Reply

Attractive section of content. I just stumbled upon your web site
and in accession capital to assert that I get in fact enjoyed account
your blog posts. Any way I will be subscribing to your feeds and even I achievement you access consistently quickly.
https://www.zonetechsupport.com/activate-espn-on-roku/

Reply

Tech Gadgets reviews and latest Tech and Gadgets news updates, trends, explore the facts, research, and analysis covering the digital world.
You will see Some Tech reviews below,

lg bluetooth headset : You will also wish to keep design and assorted features in mind. The most essential part of the design here is the buttonsof lg bluetooth headset .

Fastest Car in the World : is a lot more than the usual number. Nevertheless, non-enthusiasts and fans alike can’t resist the impulse to brag or estimate according to specifications. Fastest Car in the World click here to know more.

samsung galaxy gear : Samsung will undoubtedly put a great deal of time and even more cash into courting developers It is looking for partners and will allow developers to try out
different sensors and software. It is preparing two variants as they launched last year. samsung galaxy gear is very use full click to know more.

samsung fridge : Samsung plans to supply family-oriented applications like health care programs and digital picture frames along with games It should stick with what they know and they
do not know how to produce a quality refrigerator that is worth what we paid. samsung fridge is very usefull and nice product. clickcamera best for travel: Nikon D850: Camera It may be costly, but if you’re trying to find the very best camera you can purchase at this time, then Nikon’s gorgeous DX50 DSLR will
probably mark each box. The packaging is in a vibrant 45.4-megapixel full-frame detector, the picture quality is simply wonderful. However, this is just half the story. Because of a complex 153-point AF system along with a brst rate of 9 frames per minute. camera best specification. click here to know more.

Reply

Post a Comment