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

SOAP fault: 'sf:MALFORMED_QUERY' :: 'MALFORMED_QUERY:
Hello !
I have an Integration plattform, that talks to SalesForce thru Enterprice WSDL, and gets the following error !
I guess its has to do with "LAST_N_DAYS:33" any one out there who nows ?
Could not mediate request due to an error in provider. SOAP fault: 'sf:MALFORMED_QUERY' :: 'MALFORMED_QUERY: only aggregate expressions use field aliasing' :: 'missing fault actor'. :: Details: <?xml version="1.0"?>
<sf:MalformedQueryFault xsi:type="sf:MalformedQueryFault">
<sf:exceptionCode>MALFORMED_QUERY</sf:exceptionCode>
<sf:exceptionMessage>only aggregate expressions use field aliasing</sf:exceptionMessage>
<sf:row>-1</sf:row>
<sf:column>-1</sf:column>
</sf:MalformedQueryFault>”
Question:
Select
o.Span_Order_Id__c,
o.Installation_ID__c,
o.Status__c,
o.Opportunity.Account.Id,
o.Opportunity.Account.Account_Legal_name__c,
o.Opportunity.Account.Churned_inactive__c,
o.Opportunity.Account.Organisation_Id__c,
o.Opportunity.Account.WS_Organisation_ID__c,
o.Opportunity.Account.Owner.Phone,
o.Opportunity.Account.Owner.Email,
o.Opportunity.Account.Phone,
o.Opportunity.Account.Account_Owner_Name__c,
o.Opportunity.Account.Account_SM_Owner__r.name
From OpportunityLineItem o
where
(
(o.Installation_ID__c != '' and LastModifiedDate = LAST_N_DAYS:33) or
(o.Opportunity.StageName = 'Agreement Validated' and o.Installation_ID__c != '' and
o.Opportunity.LastModifiedDate = LAST_N_DAYS:33)
)
and o.Account_Location__c != ''
This one worked for me. try removing o.
Select
o.Span_Order_Id__c,
o.Installation_ID__c,
o.Status__c,
o.Opportunity.Account.Id,
o.Opportunity.Account.Account_Legal_name__c,
o.Opportunity.Account.Churned_inactive__c,
o.Opportunity.Account.Organisation_Id__c,
o.Opportunity.Account.WS_Organisation_ID__c,
o.Opportunity.Account.Owner.Phone,
o.Opportunity.Account.Owner.Email,
o.Opportunity.Account.Phone,
o.Opportunity.Account.Account_Owner_Name__c,
o.Opportunity.Account.Account_SM_Owner__r.name
From OpportunityLineItem o
where
(
(o.Installation_ID__c != '' and LastModifiedDate = LAST_N_DAYS:33) or
(o.Opportunity.StageName = 'Agreement Validated' and o.Installation_ID__c != '' and
o.Opportunity.LastModifiedDate = LAST_N_DAYS:33)
)
and o.Account_Location__c != ''
here is the one
Select
Opportunity.Account.Id,
Opportunity.Account.Owner.Phone,
Opportunity.Account.Owner.Email,
Opportunity.Account.Phone
From OpportunityLineItem
where
(LastModifiedDate = LAST_N_DAYS:33) or
(Opportunity.StageName = 'Agreement Validated' and
Opportunity.LastModifiedDate = LAST_N_DAYS:33)