Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Salesforce Error when ContentDocument has more than one ContentDocumentLink to User Object #24

Open
aaaaaaaaaa233 opened this issue Mar 22, 2023 · 0 comments

Comments

@aaaaaaaaaa233
Copy link

If ContentDocument has only ContentDocumentLinks with LinkedEntityId of User Object (more than two links) package will throw Internal Salesforce Error (also in AppExchange package). The error seems to be caused by lack of null check in ContentDocumentLink when checking if LinkedEntityId type is EmailMessage.

Steps to reproduce:
Create ContentVersion and create two ContentDocumentLink for two different users.

Workaround:
Create additional ContentDocumentLink pointing to any other object than User.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant