-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recipes - Aggregate SOQL Datatable has an error #101
Comments
FWIW you should not use a sandbox to test recipes (they are meant for scratch orgs). However, that doesn't mean there isn't a bug for your specific sandbox. What I want to do now is determine where the source of error is coming from. BTW, I cannot repro with a fresh scratch org and Do me a favor on this one and create a scratch org and install These data points will help save me time! |
I just set up my first ever scratch org and installed the packages using the wiki instructions and cannot replicate the issue. How do I figure out which versions I have? I am looking at Installed Packages in setup and there are none on the list. TY |
@solo-1234 if you pushed from master branch, there is no version. You would create a new scratch org and use the install procedure (instead of push) to see if you can replicate the issue. Based on your comment, it sounds like I might need to push out a
|
Got it - sure! Thanks for bearing with me... |
Not a problem! Happy to mentor and get extra help any way I can ;) |
Do I use the sandbox or prod install links for a scratch org? ETA: I got it, just copied the part after salesforce.com |
Okay in my scratch org with the packages in the wiki I do not see this error. How would I go about debugging it further in my sandbox? |
Based on the error message I wonder if it doesn't like the fact that I have record types on account opportunity. I added GROUP BY RecordTypeId to both SOQLs on the page and that got rid of the errors in my sandbox. I then copied the updated SOQLs to the scratch orgs, but it didn't like them - I get two errors: Here are the SOQL strings: Not sure what the solution would be for these recipes to work in orgs with record types and in orgs without... |
The original SOQL for opps is Added an Opp Record Type (and a Sales Process which record types require) and now I get the error: Modifying the SOQL to this gets rid of the error: Repro steps are to take a new scratch org, create a new sales process (with any opp stages you want), and then create an opp record type. Then navigate to the Aggregate SOQL Datatable tab. Is that enough? I don't know how to create a package to contain the sales process + record type but am open to learning. |
To summarize what was discussed, the source of this issue is that when an org has record types on the object, soqldatatable will automatically add RecordTypeId to the list of queried fields (for reasons related mostly to inline editing and picklists). With aggregate soql, if that field is included, it also needs to be added to GROUP BY. Short term solution is to only rely on recipes working in scratch orgs (since sandboxes can vary wildly). Longer term solution would be to adjust that feature so that the RecordTypeId field is not added to aggregate queries (which shouldn't support inline editing anyways) for the rare use cases for aggregate soql (not urgent since admins can manually add @tsalb let me know please if I missed anything! |
Sounds about right except no long term fix. Not worth the investment unless I get a PR. I’ll take the action item from here to update wiki to be more explicit about where recipes are supposed to be used. |
Closed by #108 |
Hi!
I am going through all the recipes again in preparation for testing my fix for #99. The Aggregate SOQL Datatable tab throws an error upon load:
(This is in a sandbox with a fresh install of core + recipes)
The text was updated successfully, but these errors were encountered: