trigger ContentVersionTrigger on ContentVersion (after insert) {
insert new ContentDocumentLink(
ContentDocumentId = trigger.new[0].ContentDocumentId,
LinkedEntityId = '<a user id>',
ShareType = 'C',
Visibility = 'AllUsers'
);
}
With this, I am able to specify a particular user, but I am not able to filter for only files loaded to Accounts and Opportunties. My search has fallen short, is there a way to filter or query for only files that are uploaded to Accounts and Opportunities and if so, how?
1 件の回答
Hi Christian,
Sorry for the inconvenience. In case you don't receive a response here, may I also suggest joining the Developer forums below to collaborate with the experts for best practice and advice.
https://developer.salesforce.com/forums
https://salesforce.stackexchange.com/
Hope this helps.
Regards,
Jayson