You need to sign in to do that
Don't have an account?
SFDC_Learner
DML Operation on contentversion
Hi,
When i use the following query for deleting the contentversion stored files,
List<contentVersion> lstCV = [select id from contentversion];
system.debug('----->'+lstCV.size());
delete lstCV;
i got the below error.
line 3, column 1: DML operation DELETE not allowed on ContentVersion
Can any one please tell me, how can i delete the multiple records through a list from contentversion?
Hi,
Yes you can't delete a version via the API.DML operation DELETE not allowed on ContentVersion.
Salesforce does not allow DML operation through API on the ContentVersion.
For more details refer to below Link:
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_contentversion.htm#sforce_api_objects_contentversion
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Ah yeah, After all, that was really helpful for me :D
So if we want to delete a content we have to do it from ContentDocument and not ContentVersion
Thanks
Please check profile, means profile should have delete accesss and also check record owner.
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh