+ Start a Discussion
Michael MMichael M 

How to create new version of contentversion instead of brand new separate contentversion?

Hello, we have an integration where files (contentversions) are being inserted and the contentdocumentlink is to Lead records. My task is that sometimes a new version of the file gets inserted. When that happens, I need to create a trigger that makes it create a new VERSION of the existing document, instead of creating a brand new content version. What would such a trigger look like? 

Thank you!

VinayVinay (Salesforce Developers) 
Hi Michael,

Found below example that can help you.


Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.