-
Notifications
You must be signed in to change notification settings - Fork 97
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
Unable to query due to FORMAT #78
Comments
Experiencing the same issue. Interested in whether you found a solution? |
[EDIT] I found my issue, this thread clued me in. I need to use the same inline function and alias on currency fields or the front end won't find them. Example: FORMAT(Amount) AmountFormatted [ORIGINAL]I have a simpler scenario using an Apex Data Provider. I think it's probably related though, as the results are the same. In the provider I return a list of Opps with the Amount field. The column is defined as CURRENCY, and the column outputs on the data grid, but with blank values in every cell. I can see the column definition in the debug, along with the field value in the returned data. If I change the column to DOUBLE it outputs fine, but without any currency formatting. |
I created a grid based on Opportunity and want to display a custom Account field
Account.Credit_Limit__c (which is a field type of Currency)
But the query created by this tool uses FORMAT(Account.Credit_Limit__c) with the alias Account.Credit_Limit__cFormatted
I believe this alias is the issue because when I run the entire query in developer console, I get this error:
invalid alias: Account.Credit_Limit__cFormatted
The entire query is here:
SELECT Account.Name,Name,Amount,FORMAT(Amount) AmountFormatted,tolabel(StageName),Account.Credit_Limit_Notes__c,Account.Credit_Limit__c,FORMAT(Account.Credit_Limit__c) Account.Credit_Limit__cFormatted FROM Opportunity WHERE Account.Credit_Limit_Notes__c = 'Notes for testing' ORDER BY Id ASC NULLS FIRST limit 10 offset 0
QUESTION: How can I define this field within the grid Account.Credit_Limit__c so that the query does not format and alias in the SOQL? I cannot change the field type on the Account object itself.
The text was updated successfully, but these errors were encountered: