Posts

Showing posts with the label limit

Salesforce Fact #947 | Resolving dashboard logged-in user limit error

As we know there's a limit on the number of dashboards with the option to run as the logged-in user, the below queries are useful while troubleshooting and resolving the error: SELECT FolderName,Title FROM Dashboard WHERE Type = 'LoggedInUser' OR Type = 'MyTeamUser' -> This will fetch the list if dynamic dashboards present in the org SELECT Id,Title FROM Dashboard WHERE Type != 'SpecifiedUser' -> This will return dynamic dashboards that are not in private folders.  SELECT Id,Title FROM Dashboard USING SCOPE allPrivate WHERE Type != 'SpecifiedUser'  -> This will return dynamic dashboards that are in private folders. Reference:  https://help.salesforce.com/s/articleView?id=000385369&type=1

Salesforce Fact #938 | SOQL for loop limit error

Image
Have you encountered the error:  System.QueryException: Aggregate query has too many rows for direct assignment, use FOR loop. The error is encountered when SOQL For loop is used on a parent to child SOQL and the child record list contains 200 or more records. To resolve this, we need to run a separate for loop on the child records. Attached are the screenshots.

Salesforce Fact #840 | Platform Event publish limit

Platform events configured with 'Publish Immediately' behavior are counted against a separate publishing limit of 150 EventBus.publish() calls. It can be checked by issuing a Limits. getPublishImmediateDML() method call. Whereas platform events which are configured with 'Publish After Commit' behavior are counted against the DML statement governor limit. It can be checked issuing a Limits.getDMLStatements() call. Reference:  https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_System_eventbus.htm#apex_System_eventbus_publish