forcedotcom / soql-tooling Goto Github PK
View Code? Open in Web Editor NEWSOQL Language Tooling features including the Language Server and Query Builder UI.
License: BSD 3-Clause "New" or "Revised" License
SOQL Language Tooling features including the Language Server and Query Builder UI.
License: BSD 3-Clause "New" or "Revised" License
Is your feature request related to a problem? Please describe.
The export results feature is opinionated about where to save the results - I'd like to be able to choose where they go. Another side effect of this is that you might overwrite your previous export by accident with a different query or just updated results of the same one.
Describe the solution you'd like
A save dialog might be a nice to have. Save dialogs can have default location (like what already happens), but I can choose a different location and set the file name.
Describe alternatives you've considered
At the moment you can just rename the results or manually move them somewhere else if you want.
When a user runs an invalid query we show them the generic Your query contains invalid or incomplete syntax. Fix the syntax errors and try again
but the library does provide enough information about the error. We should be surfacing that information to the user.
Sample query:
Select Id, Status, Location, Body from ApexLog
Library error message:
Select Id, Status, Location, Body from ApexLog
^
ERROR at Row:1:Column:30
No such column 'Body' on entity 'ApexLog'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.
Is your feature request related to a problem? Please describe.
Because the SOQL extension is activated when I open a .soql file, I will see the custom editor when I open a .soql file from any directory or workspace.
However if I am not in an sfdx-project as the root directory then the sobjects can not load and I can not run a soql query in the text document.
Describe the solution you'd like
The SOQL builder should only be activated if I have an sfdx-project as my root directory.
Describe alternatives you've considered
Some notification to the user they should re-open the sfdx-proj at the root directory.
Is your feature request related to a problem? Please describe.
If I have ran multiple queries and I have many tabs open of the data view then I can't keep track of which was associated with each tab
Describe the solution you'd like
have some sort of drop down in the table view of the query text that the results came from.
Describe alternatives you've considered
close each tab before running a new query
Is your feature request related to a problem? Please describe.
When the Results View is displayed, the JSON and CSV Buttons are displayed. But it's not really apparent that those will export the results. Probably just need some text.
Describe the solution you'd like
It might be better to have text that says
Download as: [csv] [json]
Code Builder or Desktop:
Code Builder
OS and version:
Windows
VS Code Version:
Browser Version (if applicable):
Edge
For accessibility, the selected fields should be in the tab order and you should be able to use the keyboard to remove them.
The selected fields should be in the tab flow, and you should be able to use the keyboard (e.g., press enter) to remove the field.
Focus skips over the selected fields to the Order By dropdown.
Feel free to attach a screenshot.
SFDX CLI Version:
Code Builder or Desktop: Desktop
OS and version: Mac 10.14.6
VS Code Version: 1.49.0
Browser Version (if applicable):
I created a default scratch org in VSCode. I installed the SOQL extension. I opened a soql file in the SOQL editor. The Salesforce CLI output showed NamedOrgNotFound: No AuthInfo found for name <scratch-org-name>
and failed to load the sobject names in the FROM field. In the meantime, sfdx force:schema:sobject:list -c all
retrieved the sobjects with no problems. When I re-selected the scratch org in the org picker, the editor was able to retrieve the sobjects.
NamedOrgNotFound: No AuthInfo found for name <scratch-org-name>
The SOQL editor is able to connect to the recently created default scratch org and retrieves sobject information.
The SOQL editor does not retrieve sobject information from the recently created default scratch org and issues the NamedOrgNotFound: No AuthInfo found for name <scratch-org-name>
message to the Salesforce CLI output channel.
Full Salesforce CLI output channel output (3 instances of NamedOrgNotFound
correspond to 3 attempts at opening SOQL editor).
Starting SFDX: Create a Default Scratch Org...
10:33:16.376 sfdx force:org:create -f config/project-scratch-def.json --setalias dreamtxdemo --durationdays 30 --setdefaultusername --json --loglevel fatal
10:33:57.776 sfdx force:org:create -f config/project-scratch-def.json --setalias dreamtxdemo --durationdays 30 --setdefaultusername --json --loglevel fatal
ended with exit code 0
NamedOrgNotFound: No AuthInfo found for name dreamtxdemo
NamedOrgNotFound: No AuthInfo found for name dreamtxdemo
NamedOrgNotFound: No AuthInfo found for name dreamtxdemo
Starting SFDX: Set a Default Org
12:37:38.369 sfdx force:config:set defaultusername=dreamtxdemo
=== Set Config
Name Value Success
─────────────── ─────────── ───────
defaultusername dreamtxdemo true
12:37:39.940 sfdx force:config:set defaultusername=dreamtxdemo
ended with exit code 0
SFDX CLI Version: 7.78.1
Starting a VSCode session with an expired SFDX authentication breaks SOQL editor. It will not throw any error but it does not populate any data on the view. Switching to a valid authentication does not work either. The only solution is to switch to a valid authentication session and then restart VSCode.
OS and version: Mac OS 10.15.7
VS Code Version: 1.51.0
Code Builder or Desktop: CB
OS and version: Mac Mojave
Error or information message that you can't select this field because it's a primary key or can't be null
Was able to select another field and indicate a Null.
Is your feature request related to a problem? Please describe.
Not specific to particular but it is about in general experience. here are the quick notes from my point of view:
Describe the solution you'd like
Nothing specific, but would like to have the best solution that improve developer experience
Describe alternatives you've considered
Nothing
Additional context
None
Code Builder or Desktop:
Desktop
OS and version:
OSX 10.14.6
VS Code Version:
1.52.0-insider
Browser Version (if applicable):
NA
When i click the Run Query button, it does not indicate that it is "busy" running the query. If the query takes a long time, my tendency is to click it again, unsure if it captured my previous click. This can result in multiple queries being run at once, with multiple result tabs displaying after the queries finally return.
This UX is especially brutal when your salesforce org has a lot of data and the query takes a while to run. For instance, log into gus.
sfdx force:auth:web:login -r https://gus.my.salesforce.com -a gus
sfdx force:config:set defaultusername=<your gus email>@gus.com
SELECT Id FROM ADM_Work__c
The Run Query button should disable and provide visible feedback to the user that is indeed carrying out their wishes.
The Run Query button just stays in it's current state, without any UX feedback that it has indeed received its orders to run the query.
SFDX CLI Version:
sfdx-cli/7.78.1-5a65d9dd2f linux-x64 node-v12.18.3
OS and version:
All
VS Code Version:
1.52.1
SFDX CLI Version:
sfdx-cli/7.80.0
When using the command palette with SFDX: Create New Soql Query, the file it produces is untitled. And the toggle icon to toggle between source and builder is not available in the title menu until the file is saved with a .soql extension.
I would expect that anytime the soql builder ui is active, the title menu should include the toggle icon.
Toggle icon is not present until file is save as *.soql
Code Builder
Version: 1.51.0-insider
Commit: 076245b1ce18bc0c262bb287b3fcad1575d756ae
Date: 2020-10-14T19:02:31.672Z
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.80 Safari/537.36
There seems to be some issue when the limit field is set to 0, and then it gets removed from the soql statement ( see other bug ). Running the query returns Zero results as if the LIMIT 0
is still set in the statement.
Additional interaction with the LIMIT field resolves the issue as a work around. But it's not apparent why there are no results.
Since the LIMIT clause has been removed, I would expect all results.
Zero records returned
SFDX CLI Version: sfdx-cli/7.74.1-32db2396ed linux-x64 node-v12.18.3
Hello,
Recently I just installed this extension to my workspace: SOQL Builder for Visual Studio Code. This is really amazing and, also waited for this update. I have some feedback which has been mentioned below.
OS and version:
Windows 10
VS Code Version:
1.52.1
SFDX CLI Version:
7.82.1
When autosave is not turned on, the soql preview does not update to represent the actual state of the query. It appears that the onDocumentChange event does not get fired until the file is saved. And then it updates. This can cause confusion since the state of the inputs and the preview do not match. When the query is run, it is run with the soql query that is currently unsaved in the text document.
Short summary of what is going on or to provide context.
I guess that the soql statement in the preview should align with the state of the UI controls. And the state of the unsaved soql file. It might be nice for the user to know that this preview is not saved. Which could give them confidence to make changes and manipulate their query until they WANT to save the results.
I usually work with autosave on. So I expect the state of the UI, the preview, and the saved file to always be the same. But novice users may prefer to manually control saving the file.
UI controls in the soql builder and the preview are not in sync.
The SOQL language server does not provide any type of data when a user is directly typing a query on a .soql file using the Text Editor. Not sure if this is a bug or was not implemented.
Is your feature request related to a problem? Please describe.
It would be nice to have an option with a link to view the record in salesforce.
Describe the solution you'd like
I would like to have another column which shows the actions to view the record in salesforce or show all the data of that record irrespective of what fields mentioned in soql
Describe alternatives you've considered
I need to select all the fields manually and then rerun the query, instead the option which automatically shows record details with all the fields would be a great plus
Additional context
None
Is your feature request related to a problem? Please describe.
When I open the SOQL builder with no default or set and click "run query", there is no indication that anything is happening and the extension appears broken. The only way to know that an attempt was made to run query is to open the output console and see a log to the channel.
Describe the solution you'd like
I would like some sort of reminder or notification that I need to have set a default org before I can run a query.
Describe alternatives you've considered
I would have to know to open the output channel and look for messages or logs.
Additional context
In this case, the text document contained a valid query but I couldn't run it.
Code Builder or Desktop:
Desktop
OS and version:
Catalina 10.15.7
VS Code Version:
Version: 1.51.1
Unable to click between tabs of soql file opened with both SOQL Editor and Text Editor
.soql
file in Explorer.soql
file in ExplorerI should be able to click on the open "Text Editor" tab of the .soql
file
The "Text Editor' tab of the soql
file is disabled (non-clickable). I can only close it but can't switch to the view.
This may be a VScode issue?
Code Builder or Desktop: Both
OS and version: Linux
VS Code Version:1.50
Browser Version (if applicable):
When a query contains syntax that is not yet supported in the UI, an "Unsupported Syntax" error message is shown. This can be confusing to a user because it might imply that there is bad syntax, not simply syntax that is beyond the capabilities of the editor.
query.soql
with contents SELECT Id FROM Account WHERE Name = 'HelloWorld'
.A message is displayed that concisely conveys that the editor can't handle the syntax but there is no problem with syntax itself.
User is presented with potentially confusing "Unsupported Syntax".
SFDX CLI Version: 7.74.1
Code Builder or Desktop:
Code Builder
OS and version:
Windows
VS Code Version:
Browser Version (if applicable):
Edge
When selecting fields in the SOQL Builder editor, a user should be able to use the arrow keys and pressing the enter key should add the field.
Short summary of what is going on or to provide context.
The field gets added to the list when pressing enter
The field is not added.
Feel free to attach a screenshot.
SFDX CLI Version:
Code Builder or Desktop: Code Builder
OS and version: MacOS Catalina
VS Code Version: Version: 1.51.0-insider
Commit: 076245b1ce18bc0c262bb287b3fcad1575d756ae
Date: 2020-10-14T19:02:31.672Z
Browser Version (if applicable): Google Chrome 86.0.4240.75
Playing with adding/removing query fields
Have the field removed for good.
The field disappears, then re-appears for a moment, and finally disappears.
Is your feature request related to a problem? Please describe.
For whatever reason, sometimes it takes minutes to load SObjects or their metadata. When the metadata is loading, I see "...loading..." but no indication that anything is happening. This is frustrating.
Describe the solution you'd like
Waiting so long for the fields to become enabled once is very frustrating. Waiting twice is unacceptable. The SOQL Builder should take advantage of a cache so that this wait does not occur more than once. Additionally, some output (say, on the "Salesfore CLI" channel, would be useful to indicate that we are trying to do something.
Describe alternatives you've considered
Additional context
I experienced these long waits while using Linux. It's hard to see how that has anything to do with it, but who knows?
Is your feature request related to a problem? Please describe.
SOQL queries are supported by both the Data APIs and Tooling API. The SOQL Builder should allow a user to switch between both APIs.
This is supported by the query commands in VSCode, the CLI and the @salesforce/core
library.
Is your feature request related to a problem? Please describe.
General product feature requests
Describe the solution you'd like
Describe alternatives you've considered
Alternatives are to use other tooling, such as https://getjetstream.app/ - but sometimes it is nice not to have to leave my development environment.
Additional context
none
Code Builder or Desktop: Desktop
OS and version: Mac 10.14.6
VS Code Version: 1.49.0
Browser Version (if applicable):
+-e.
in the limit field.Typing these characters is suppressed (like all other non-numeric characters).
These characters appear in the limit field.
SFDX CLI Version: 7.78.1
We aim for 1 topic per issue - This is a break out of a feedback from #124:
I want to traverse relationships (e.x. let me build Account.Owner.Name)
Code Builder or Desktop: CB
OS and version: Mac Mojave
Nulls would be at bottom of query results - I need to understand the resolution order for options
Nulls seemed to have no effect on Query results order when order has values (Name ASC ruled order)
When I deleted Order specific fields for ASC, DESC and just generally had order selected as DESC or --, null field was second result out of 3.
After running it with -- for Order and switching back to DESC, Query Results crashed with unhappy paper face icon.
Is your feature request related to a problem? Please describe.
There should be an option in the SOQL Builder UI to use all the fields of an object in a query. Having to scroll and click on each field is not a good experience when an object has more than 5-10 fields.
Code Builder or Desktop: Both
OS and version: MacOS Mojave 10.14.6
VS Code Version: 1.50/0
Browser Version (if applicable): Chrome
When I open a .soql query with unsupported syntax, I am still presented with a preview of the query but there is a mismatch between what the preview shows and what the query in the text document is. I can still click "run query" if the query is valid and see results in the table view.
At the very least this is confusing as a user. It is hard to tell if the results I'm presented with represent the query in the preview or the text document.
SELECT Name, AccountNumber, Type, NumberOfEmployees, BillingCity, BillingCountry, BillingStreet, Website
FROM Account
WHERE NumberOfEmployees >= 50 AND BillingCity = 'Tulsa'
ORDER BY AccountNumber ASC
The preview should display what is in the text document, or I should be able to tell the source query of the results I am presented with.
neither of the above
SFDX CLI Version:
Version: 1.51.0
Commit: fcac248b077b55bae4ba5bab613fd6e9156c2f0c
Date: 2020-11-05T18:14:40.758Z
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Darwin x64 18.7.0
There is a little white square that appears with when there is no object and fields selected. This only seems to appear initially, like if you open an empty file or type a query "SELECT name FROM". However once an object is selected and the fields are populated. I am unable to get the square to show up again.
Version: 1.50.1 (user setup)
Commit: d2e414d9e4239a252d1ab117bd7067f125afd80a
Date: 2020-10-13T15:06:15.712Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.17763
Code Builder or Desktop: Desktop
OS and version: Windows 10 (VirtualBox VM)
When a user clicks "csv" or "json" to save the query results then the newly created file is supposed to be revealed and focused in the file explorer. This is behavior we get when using MacOS. However in Windows, the file explorer is opened but the correct file is not revealed and focused.
on Windows
On MacOS
On Windows
The explorer is opened but the focus is in the wrong spot
Orgs enable entities around standard & custom objects that can't be queried (e.g. <custom object api name>__ChangeEvent
) but these objects still get listed in the UI and allow the user to build a query.
These objects should not get listed in the SOQL Builder UI.
OS and version: Mac OS 10.15.7
VS Code Version: 1.51.0
Is your feature request related to a problem? Please describe.
The list of objects available in the "From" dropdown is cumbersome. It would be better to be able to filter that list with a text input box that provided autocomplete and suggestions. Currently, the default select input, while functional, is overwhelmingly long.
Describe the solution you'd like
What i would like to have is a component that will show all the available selections, but also allow me to type and that would filter down the selections to match my typing. It should also offer the top match so that when i hit enter, i don't have to leave my keyboard or use the mouse.
Additional context
Google search as an example of the UX I'd like to see.
Code Builder or Desktop:
Code Builder
OS and version:
Mac OSX 10.14.6
VS Code Version:
Version: 1.51.0-insider
Commit: 076245b1ce18bc0c262bb287b3fcad1575d756ae
Date: 2020-10-14T19:02:31.672Z
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.80 Safari/537.36
Browser Version (if applicable):
Version 86.0.4240.80 (Official Build) (x86_64)
When putting a 0 in the limit field of the UI, the limit statement is then deleted from the soql. My assumption is that LIMIT 0 is a valid statement so that a query can be tested without returning results.
Interesting though, for Low Code Users I wonder if a limit of 0 makes much sense. If they set the limit to 0, they likely want to get rid of the limit to the statement. And setting it to 0 vs deleting the limit text might actually be a valid interaction with the UI.
I guess i expected the limit to remain in the soql statement as LIMIT 0. But there is some question as to what Low Code Users might expect.
SFDX CLI Version: sfdx-cli/7.74.1-32db2396ed darwin-x64 node-v12.18.3
Code Builder or Desktop: CB
OS and version: Mac
Buttons should use title capitalization according to our UI standards.
add > Add
csv > CSV
json > JSON
Is your feature request related to a problem? Please describe.
It's a bit difficult to scroll through fields when there's a lot of them - especially if your eyes aren't so kind
Describe the solution you'd like
It'd be nice to either let the user resize, have the list box expand with the window size, or even just make it a little taller than it is now. Another small but really helpful improvement would be to alphabetize the fields.
We aim for 1 topic per issue - This is a break out of feedback from #124 and #128.
from @loktevich: on #124
Provide a way to edit SOQL query in the builder window
For now, if I need to edit a SOQL query I need to switch to the text editor. There is a readonly textarea field with the resulting query. Make it editable. It will also help to build complex queries with relationships and get JSON data for them before corresponding general features are implemented.
from on @brahmajitammana on #128
Option to edit the query inside soql query instead of text editory
Code Builder or Desktop: Both
OS and version:
VS Code Version:
Browser Version (if applicable): any
If I have an instance of the soql builder open and no default org is set, then I set a default or, the UI does not refresh to represent the sobjects in my new default org.
sobjects should be populated to reflect the new org
Nothing happens, I have to close and re-open the soql file to retrieve the sobjects
SFDX CLI Version:
When running a query that gets data from a field on a related object it introduces data that was not queried for.
Sample query:
Select childobjectname__c, fieldname__c, isCascadeDelete__c, z_ChildSObjectDescription__c, z_ChildSObjectDescription__r.Name, z_ChildSObjectDescription__r.isDeprecatedAndHidden__c FROM z_ChildRelationship__c
This causes the JSON result to include a new object in the result.
It causes the CSV output to have a column with [object Object]
value which hides all the data that was queried for.
Code Builder or Desktop: Both
OS and version: Linux
VS Code Version: 1.50
Browser Version (if applicable):
When 'Run Query' is run on an invalid query, a notification is popped that tells the user that there is invalid syntax. It is not clear that the message is coming from the Query Runner. A user might think it is coming from the SOQL Builder. If the user cannot tell how to fix the syntax using the SOQL Builder (the editor has very limited syntax error recognition), the generic message in the notification may not be enough for the user to address the problem. Since the error has presumably come back from the org, I wonder if there is some more helpful information in the org's response.
query.soql
with contents SELECT FROM
.Run Query
. Note the '... invalid syntax ...' notification.The notification message contains some indication that it was running the query that caused it to pop (this is not clear since there is some communication delay between pressing the button and receiving a reply from the org). It also contains root cause information that may help the user address the problem.
The notification of unclear origin says: "Your query contains invalid or incomplete syntax. Fix the syntax errors and try again."
SFDX CLI Version: 7.74.1
We aim for 1 topic per issue - This is a break out of a feedback from #124:
I want to see the field label and field type (e.x. Account Name, Name, Text)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.