Happy Business Starts Here

727 CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY zqu.ProductTrigger:

0 Kudos

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

1 Comment
Zuora Alumni

Whenever we encounter this error message during a sync, we run a clean up. Once the clean up is completed, we then run a full sync. This is known to resolve the sync failure. The same is addressed in our CSA here: 

 

http://community.zuora.com/t5/Zuora-for-Salesforce/Sync-Error-CANNOT-INSERT-UPDATE-ACTIVATE-ENTITY/m...