- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Email to a Friend
- Printer Friendly Page
- Report Inappropriate Content
727 CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY zqu.ProductTrigger:

When inserting or updating more than 101 products, the following error occurs.
727 CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY zqu.ProductTrigger:
System.LimitException: zqu:Too many SOQL queries: 101
Since I think that salesforce governor limits can be avoided by only 1 SOQL query and 1 update statement is executed, I would like to fix the trigger.
- Reference
System.LimitException: Too many SOQL queries: 101 https://help.salesforce.com/articleView?id=000181404&language=en_US&type=1
Now if this trigger is invoked with a single Account record or up to 200 Account records, only 1 SOQL query and 1 update statement is executed. https://developer.salesforce.com/page/Best_Practice:_Avoid_SOQL_Queries_Inside_FOR_Loops
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.