diff --git a/CHANGES.md b/CHANGES.md index 7e125316..55c1110c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,7 @@ ## General +- Reduce the chances to hit limit on EntityDefinition query for large orgs [issue 138](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/138) (issue by [AjitRajendran](https://github.com/AjitRajendran)) - Add 'LIMIT 200' when selecting 'FIELDS(' in autocomplete [issue 146](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/146) ) - Change method to get extension id to be compatible with firefox [issue 137](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/137) (issue by [kkorynta](https://github.com/kkorynta)) - Fix hardcoded browser in Generate Token url [issue 137](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/137) (issue by [kkorynta](https://github.com/kkorynta)) diff --git a/addon/popup.js b/addon/popup.js index 29de4b1f..3f9ddcdb 100644 --- a/addon/popup.js +++ b/addon/popup.js @@ -413,8 +413,9 @@ class AllDataBox extends React.PureComponent { // We cannot use limit and offset to work around it, since EntityDefinition does not support those according to the documentation, and they seem to work in a querky way in practice. // Tried to use http://salesforce.stackexchange.com/a/22643, but "order by x" uses AaBbCc as sort order, while "where x > ..." uses sort order ABCabc, so it does not work on text fields, and there is no unique numerical field we can sort by. // Here we split the query into a somewhat arbitrary set of fixed buckets, and hope none of the buckets exceed 2000 records. - getEntityDefinitions(" where QualifiedApiName < 'M' limit 2000"), - getEntityDefinitions(" where QualifiedApiName >= 'M' limit 2000"), + getEntityDefinitions(" WHERE QualifiedApiName < 'M' LIMIT 2000"), + getEntityDefinitions(" WHERE QualifiedApiName >= 'M' AND QualifiedApiName < 'U' LIMIT 2000"), + getEntityDefinitions(" WHERE QualifiedApiName >= 'U' LIMIT 2000"), ]) .then(() => { // TODO progressively display data as each of the three responses becomes available