You need to sign in to do that
Don't have an account?
Arun Kumar
Error in writing Test Class for ContentVersion() Object
Hi,
I have getting the error while running the below test code:
You cannot set custom fields or tags on a document published into a private library. Fields set: Opportunity,Account: []
ContentVersion testContentInsert = new ContentVersion();
I have getting the error while running the below test code:
You cannot set custom fields or tags on a document published into a private library. Fields set: Opportunity,Account: []
ContentVersion testContentInsert = new ContentVersion();
testContentInsert.ContentURL='http://www.google.com/';
testContentInsert.Title = 'Google.com';
testContentInsert.RecordTypeId = ContentRT.Id;
testContentInsert.Account__c = acc.Id;
testContentInsert.Opportunity__c = opp.Id;
insert testContentInsert;
testContentInsert.Title = 'Google.com';
testContentInsert.RecordTypeId = ContentRT.Id;
testContentInsert.Account__c = acc.Id;
testContentInsert.Opportunity__c = opp.Id;
insert testContentInsert;
1) https://developer.salesforce.com/forums/?id=906F00000008lcnIAA Please let us know if this will help you
Thanks
Amit Chaudhary
If you can have a look on my code, my code matches the blog's code. the difference is I am using two custom field for Account and Opportunity on Contant Version object.
So when I am trying to insert this record I am getting the error.
System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION,
You cannot set custom fields or tags on a document published into a private library. Fields set: Opportunity,Account: []