You need to sign in to do that
Don't have an account?

MALFORMED_QUERY using formula field
Hi all,
First, let me say that i am new to developing with SalesForce and the API. I am using the Partner WSDL to connect to SF. I am trying to pull a query that contains a formula field in the condition clause, but i am getting a MALFORMED_QUERY error saying 'unexpected token Next_Invoice_Date__c'. I have searched and searched for an answer, but i cant seem to find one.
My query (VB.NET):
Code:Dim SFqr As SForce.QueryResult = SFService.query("SELECT Id, Name, ACCT_Last_invoice_date__c, Next_Invoice_Date__c FROM Opportunity " _ & "WHERE OPS_Lease_Begin_Date__c != null " _ & "AND Next_Invoice_Date__c <= " & sMaxDate & " " _ & "AND (Turn_off_billing_date__c = null OR Turn_off_billing_date__c > Next_Invoice_Date__c) " _ & "AND (ACCT_Last_invoice_date__c != Next_Invoice_Date__c AND ACCT_Last_invoice_date__c != null)")
The variable sMaxDate is populated with a date in the format yyyy-MM-dd. The text in red is what the error is referring to. What i dont understand is why it is excepting the first Next_Invoice_Date__c (in orange), but not the second.
Can someone please advise me on what to do?
Thanks in advance
~Scott~
have you tried usign SForce Explorer to debug this query?
If drop me an email and I will send you a pre-release of DataScope which is in final testing and may help.
Cheers
Gareth.
I guess i will have to whip out some nasty workaround then. :smileyhappy:
~Scott~