+ Start a Discussion
Yuriy KovarskiyYuriy Kovarskiy 

Query API call problem

I try to use a query API call that looks as follows:

select Id from Account where InstitutionType__c = <value>

The problem (Malformed query error) occurs when value = Doctor's Office because it contains a single quote.

InstitutionType__c is a custom field that we added to Account entity.

How can I fix this query? 


Yuriy Kovarskiy

You need to escape the ' with a \, see the SOQL docs.
hello Yuriy,
You have written that you have added custom field to Account.
I also have to add custom field to account and lead . I am using Sforce 6.0 API and asp.net using c#. Can u guide me how can i add this ?
i am using partner WSDL.