SalesforceLabs / OrgCheck

Org Check is an easy-to-install and easy-to-use Salesforce application in order to quickly analyze your org and its technical debt.
MIT License
127 stars 28 forks source link

NUMBER_OUTSIDE_VALID_RANGE: Maximum SOQL offset allowed for apiName ApexClass is 2000 #448

Open JainySilva opened 6 days ago

JainySilva commented 6 days ago

TAB apex-classes NUMBER_OUTSIDE_VALID_RANGE: Maximum SOQL offset allowed for apiName ApexClass is 2000

NUMBER_OUTSIDE_VALID_RANGE: Maximum SOQL offset allowed for apiName ApexClass is 2000 at r.getError (https://sandboxurl--orgcheck.sandbox.vf.force.com/resource/1727095983000/orgcheck__OrgCheck_SR/js/jsforce.js:1:72641) at eval (https://sandboxurl--orgcheck.sandbox.vf.force.com/resource/1727095983000/orgcheck__OrgCheck_SR/js/jsforce.js:1:71009) at eval (https://sandboxurl--orgcheck.sandbox.vf.force.com/resource/1727095983000/orgcheck__OrgCheck_SR/js/jsforce.js:1:229493) at eval (https://sandboxurl--orgcheck.sandbox.vf.force.com/resource/1727095983000/orgcheck__OrgCheck_SR/js/jsforce.js:1:229521) at o (https://sandboxurl--orgcheck.sandbox.vf.force.com/resource/1727095983000/orgcheck__OrgCheck_SR/js/jsforce.js:1:104504) at MutationObserver. (https://static.lightning.force.com/bra4s.sfdc-xwy4ub/auraFW/javascript/eGx3MHlRT1lEMUpQaWVxbGRUM1h0Z2hZX25NdHFVdGpDN3BnWlROY1ZGT3cyNTAuOC40LTYuNC41/aura_prod.js:92:91749) at e. (https://static.lightning.force.com/bra4s.sfdc-xwy4ub/auraFW/javascript/eGx3MHlRT1lEMUpQaWVxbGRUM1h0Z2hZX25NdHFVdGpDN3BnWlROY1ZGT3cyNTAuOC40LTYuNC41/aura_prod.js:46:4694)

RECIPE apex-classes Error in dataset!

DATASET apex-classes NUMBER_OUTSIDE_VALID_RANGE: Maximum SOQL offset allowed for apiName ApexClass is 2000

NUMBER_OUTSIDE_VALID_RANGE: Maximum SOQL offset allowed for apiName ApexClass is 2000 at r.getError (https://sandboxurl--orgcheck.sandbox.vf.force.com/resource/1727095983000/orgcheck__OrgCheck_SR/js/jsforce.js:1:72641) at eval (https://sandboxurl--orgcheck.sandbox.vf.force.com/resource/1727095983000/orgcheck__OrgCheck_SR/js/jsforce.js:1:71009) at eval (https://sandboxurl--orgcheck.sandbox.vf.force.com/resource/1727095983000/orgcheck__OrgCheck_SR/js/jsforce.js:1:229493) at eval (https://sandboxurl--orgcheck.sandbox.vf.force.com/resource/1727095983000/orgcheck__OrgCheck_SR/js/jsforce.js:1:229521) at o (https://sandboxurl Org Check - Error --orgcheck.sandbox.vf.force.com/resource/1727095983000/orgcheck__OrgCheck_SR/js/jsforce.js:1:104504) at MutationObserver. (https://static.lightning.force.com/bra4s.sfdc-xwy4ub/auraFW/javascript/eGx3MHlRT1lEMUpQaWVxbGRUM1h0Z2hZX25NdHFVdGpDN3BnWlROY1ZGT3cyNTAuOC40LTYuNC41/aura_prod.js:92:91749) at e. (https://static.lightning.force.com/bra4s.sfdc-xwy4ub/auraFW/javascript/eGx3MHlRT1lEMUpQaWVxbGRUM1h0Z2hZX25NdHFVdGpDN3BnWlROY1ZGT3cyNTAuOC40LTYuNC41/aura_prod.js:46:4694)

VinceFINET commented 4 days ago

Thank you for this tcket. I can reproduce it when doing the following in an org that has a lot of apex classes:

SELECT count(Id) FROM apexclass gives me 3501 --> ok

SELECT Id FROM apexclass limit 2000 offset 0 gives me 2000 records --> good!

SELECT Id FROM apexclass limit 2000 offset 2000 gives me 1501 records --> good!

2000 + 1501 = 3501 --> logical and good!

BUT if i do (and it does not make any sense i know) SELECT Id FROM apexclass limit 2000 offset 4000 gives me the same error as you.

Now I need to understand why the app is trying to gather more records than it should in your org.

as a start, could you @JainySilva perform the query SELECT count(Id) FROM apexclass and put the result here please?

VinceFINET commented 4 days ago

do you have by any chance exactly 4000 apexclasses ????

JainySilva commented 4 days ago

Hi,

In the sandbox we tested we have 11828 classes.

Best regards.

VinceFINET commented 4 days ago

Hello

How the same count query with the additional statement:

WHERE ManageableState IN ('installedEditable', 'unmanaged')

Le ven. 27 sept. 2024 à 21:48, JainySilva @.***> a écrit :

Hi,

In the sandbox we tested we have 11828 classes.

Best regards.

— Reply to this email directly, view it on GitHub https://github.com/SalesforceLabs/OrgCheck/issues/448#issuecomment-2379950734, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA47R26EYWVE7DKPYLQMD5DZYWZCHAVCNFSM6AAAAABO5GQW46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZZHE2TANZTGQ . You are receiving this because you were assigned.Message ID: @.***>

VinceFINET commented 2 days ago

I meant this query

SELECT COUNT(Id) FROM ApexClass WHERE ManageableState IN ('installedEditable', 'unmanaged')

Le ven. 27 sept. 2024 à 22:54, Vincent FINET @.***> a écrit :

Hello

How the same count query with the additional statement:

WHERE ManageableState IN ('installedEditable', 'unmanaged')

Le ven. 27 sept. 2024 à 21:48, JainySilva @.***> a écrit :

Hi,

In the sandbox we tested we have 11828 classes.

Best regards.

— Reply to this email directly, view it on GitHub https://github.com/SalesforceLabs/OrgCheck/issues/448#issuecomment-2379950734, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA47R26EYWVE7DKPYLQMD5DZYWZCHAVCNFSM6AAAAABO5GQW46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZZHE2TANZTGQ . You are receiving this because you were assigned.Message ID: @.***>

JainySilva commented 2 days ago

Hi,

Follow:

Org Check - Query