You need to sign in to do that
Don't have an account?
Ashw
Assigning a value in Content version field in after insert get the error as FIELD_INTEGRITY_EXCEPTION, You cannot set custom fields or tags
I have written a trigger logic to update a custom field verion_Id__c with contentversionID but facing the error as "You cannot set custom fields or tags" I need experts to help in fixing the issue. below is the code.
if(trigger.IsAfter){ if(trigger.IsInsert){ list<ContentVersion> lstObj = [Select id,VersionNumber,version_id__c from ContentVersion where Id IN: Trigger.newMap.keySet()]; for(ContentVersion con: lstObj ){ if(con.VersionNumber == '1' ) con.version_id__c = con.Id; } update lstObj; } }
I suggest looking at the following posts as well
https://developer.salesforce.com/forums/?id=906F00000008lcnIAA
https://developer.salesforce.com/forums/?id=906F0000000910YIAQ