-
Notifications
You must be signed in to change notification settings - Fork 238
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
Error When Adding a Note in SF Lightning Due to DLRS Trigger #558
Comments
Sorry that I'm new to this, but has anyone experienced this issue before or know how to overcome it? Thank you! |
@ccharles76 I haven't used DLRS for this object before. The error is strange indeed. I'll make some time this week to try this out. If I can get the same error then we can work on a resolution. I'll respond back at some point this week. |
I was able to find a work-around, but it doesn't work as well as I would like. I wanted to share it: I was able to create a Process Builder rule based on my Expense Object when the Amount field Is Changed = TRUE OR Amount Is Null = FALSE. The Immediate Action is to call APEX, referencing my rollup summary unique name and the Parent Record Id of my Expense.Id field. It runs correctly after I make an edit to the Expense record, but if I just add a File (attachment), the process builder does not trigger. |
…dding-note Fixes issue #558 by avoiding running query that won't have any masterRecordIds to filter by
I have now merged @douglascayers fix, it will go out in the next package release. |
Fixed in v2.10 |
I need to track employee/consultant expenses and have a custom object in Salesforce Enterprise Edition called “Expenses”. We need to be able to see if there are attachments (receipts) to those expenses. We are using the Lightning interface, so we had to use the new Salesforce Files/Notes object instead of the traditional Attachments related list. Because there is not a master-detail relationship between expenses and Files, we were unable to do a roll-up summary and thus I used the Declarative Rollup Lookup Summary tool to create a rollup summary (see attached screen shot of the setup).
It is calculating the number of “Files” correctly and I thought all was well. However, I recently learned that the trigger that the DRLS created causes an issue with the “Files” / “Notes” object. In Lightning or Classic, if I attempt to create a new Note in Salesforce, I receive an error. The error is more descriptive in Classic and the error says:
Apex trigger dlrs_ContentDocumentLinkTrigger caused an unexpected exception, contact your administrator: dlrs_ContentDocumentLinkTrigger: execution of AfterInsert
caused by: System.QueryException: Implementation restriction: ContentDocumentLink requires a filter by a single Id on ContentDocumentId or LinkedEntityId using the equals operator or multiple Id's using the IN operator.: Class.dlrs.LREngine.QueryExecutor.query: line 659, column 1
Does anyone have a suggestion as to how to solve this issue? Thank you, in advance!
The text was updated successfully, but these errors were encountered: