You need to sign in to do that
Don't have an account?
Eduardo Rodriguez 23
Winter 18 - Problem with Dynamic SOQL referencing Formula Field (ORA-00936)
We have a custom object with a Formula field referncing the Amount field in the Opportunity object. In apex, we use dynamic SOQL to generate a query that includes this field. When the code executes in Winter 18 (Partial Sandbox), we are receiving this error when the query executes: System.UnexpectedException: common.exception.SfdcSqlException: ORA-00936: missing expression.
Exact same code is working fine in Production (Summer 17). We tested in a Developer Sandbox running Winter 18 and it is working fine too. Compared the metadata between the two sandboxes and seems to be the same. Anyone else seeing problems with dynamic SOQL queries in Winter 18?
Exact same code is working fine in Production (Summer 17). We tested in a Developer Sandbox running Winter 18 and it is working fine too. Compared the metadata between the two sandboxes and seems to be the same. Anyone else seeing problems with dynamic SOQL queries in Winter 18?
Can you please post your APEX code here, so that some of us can take a look?
Opportunities class:
OpportunityReviews class:
At execution time query.text = We have done some troubleshooting and if we remove the opportunity_amount__c field from the query, the code executes successfully. opportunity_amount__c is a formula field (currency) with the following formula: Opportunity__r.Amount in the Opportunity_Review__c object. The same code is executing without this error in Production (Summer 17).