Happy Business Starts Here

Highlighted
Zuora Support

zqu.ProductRatePlanChargeUOMTrigger: System.LimitException: zqu:Too many SOQL queries: 101

Getting below error during ProductRatePlanCharge sync:

CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY:zqu.ProductRatePlanChargeUOMTrigger: System.LimitException: zqu:Too many SOQL queries: 101

 






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

1 REPLY 1
Zuora Support

Re: zqu.ProductRatePlanChargeUOMTrigger: System.LimitException: zqu:Too many SOQL queries: 101

The reported error CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY:zqu.ProductRatePlanChargeUOMTrigger: System.LimitException: zqu:Too many SOQL queries: 101 is an issue fixed in our managed package code in ZQuote release 9.0.

https://knowledgecenter.zuora.com/AA_Whats_New/BA_Zuora_for_Salesforce_Quotes_Release#Major_Release_...

The trigger is invoked in the Quotes package whenever a catalog sync is updating the Charge Model of a ProductRatePlanCharge from one value to another. 
The intention of the trigger is to delete all tiers underneath those charges, so they can be re-created for the new charge model.

But when charge model changes for many charges at once, there's a query in the package to retrieve tiers that doesn't scale correctly, which hits a governor limit and fails to update the charge, then the sync creates new tiers anyway.

Please find below the Data fix you can apply to unblock from syncing the PRPCs

*Data fix:* Identify charges where the Charge Model is different between the Zuora PRPC record and the Salesforce PRPC record, and update the Salesforce Charge record to the correct new charge model and delete the tiers. After that, the Sync should skip the queries to delete tiers, and avoid hitting the limit you're seeing.






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √