Happy Business Starts Here

Re: Reduce number of accounts read to populate dropdown by 1, so that it doesn't generate warning em

0 Kudos

Reduce number of accounts read to populate dropdown by 1, so that it doesn't generate warning email.

Reduce the number of account records read from 10,000 to 9,999 (or other number) when populating dropdown in quotes, so that quotes no longer generates warning emails.  Since this process is working as designed, it shouldn't create warnings to be emailed to administrators.

1 Comment
Zuora Alumni

Here is some context on this posting.


When a create Quote flow is initiated by following the steps below,


1) After logging in to salesforce org, click on 'Quotes' Tab,
2) click on 'New Quote' button
3) Click on the search button for Select Account that opens this look up page


the following Query is generated:


"select name,accountnumber from Account"


In case any org has >10,000 Accounts ( e.g , 20,376 ), an email is received from salesforce if the  user setting ("Send Apex Warning emails" ) is enabled, which sends the user  an email every time a query is close to the governor limit. :



Zuora Quotes component zqu__LookupComponentPopupWindow generated a warning email from SalesForce that a resource limit was reached. Email attached, text is:

Operation: /apex/zqu__LookupComponentPopupWindow

By user/organization: xxxxxxxxx/xxxxxxxxxx

Caused the following Apex resource warnings:

zqu:Number of query locator rows: 10000 out of 10000 "



Based on the following Salesforce Article, Since the governor limit for a query locator is 10,000 records, we set the limit on number of returned rows to 10,000 records, in managed package code.



User  will continue receiving the email  as long as the "Send Apex Warning emails" setting  is enabled, because the page returns 10,000 out of 10,000 results if there are 20,376 (over 10,000) Accounts in the  Org.