-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
- Feature
- Bug Request
Description
I tried to parse this SOQL:
SELECT Company, toLabel(Status)
FROM Lead
WHERE toLabel(Status) = 'le Draft'I took this soql query from: https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_tolabel.htm
Result;
{
"fields": [
{
"text": "Company"
},
{
"fn": {
"text": "toLabel(Status)",
"name": "toLabel",
"parameter": "Status"
}
}
],
"subqueries": [],
"sObject": "Lead",
"whereClause": {
"left": {
"field": "toLabel(Status)",
"operator": "=",
"value": "'le Draft'"
}
}
}The toLabel(status) function in the WHERE clause is parsed as a field. I think that it should be parsed as a function as it happens in the SELECT clause.
Expected result:
{
"fields": [
{
"text": "Company"
},
{
"fn": {
"text": "toLabel(Status)",
"name": "toLabel",
"parameter": "Status"
}
}
],
"subqueries": [],
"sObject": "Lead",
"whereClause": {
"left": {
"fn": {
"text": "toLabel(Status)",
"name": "toLabel",
"parameter": "Status"
},
"operator": "=",
"value": "'le Draft'"
}
}
}paustint
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working