You need to sign in to do that
Don't have an account?
Jeannine Robitaille
Can't Add 1 file to Opportunity
I have a trigger on ContentDocumentLink for Before Insert. The trigger handles the condition to prevent an insert and has a error that displays. In debugging, the trigger appears to function as expected except a different error displays - "Can't Add 1 file to Opportunity". See attached error displayed instead. Yet I am expecting the error from my trigger to show "File Upload is restricted for Opportunity".
check this doc: https://help.salesforce.com/s/articleView?id=000381870&type=1.
Short answer:,
1. deactivate your trigger and check if the error persists.
2. check if you've exceeded file storage limits.
3. check if any fields are marked as required on ContentVersion object.
4. check if there are any other validation rules written on ContentDocumentLink object.