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

how to use SOSL from .Net
Can someone please let me know how to use SOSL from .Net?
I am using the below query and geeting MALFORMED_QUERY: unexpected token: FIND
string txt="Acme"; string query="FIND :"+txt+" IN NAME FIELDS RETURNING Account(Id, Name, Type,BillingStreet,Billingcity,BillingState,BillingPostalCode,Owner.Name WHERE RECORDTYPEID='xxxxxxx')";
Please advise...
First of all, your SOSL doesn't look right. There's no colon operator in SOSL, it should look like
FIND {map*} IN ALL FIELDS RETURNING Account (id, name), Contact, Opportunity, Lead
Then: you should be using the search() method, not the query() method, to run SOSL. See some sample code in the docs here.
All Answers
First of all, your SOSL doesn't look right. There's no colon operator in SOSL, it should look like
FIND {map*} IN ALL FIELDS RETURNING Account (id, name), Contact, Opportunity, Lead
Then: you should be using the search() method, not the query() method, to run SOSL. See some sample code in the docs here.
I tried your suggestion, but i keep receiving the error...
MALFORMED_QUERY: unexpected token: FIND
string Acct_query = "FIND {" + searchText + "*} IN ALL FIELDS RETURNING Account (id, name) where RECORDTYPEID='xxxxx' ";
sForce.QueryResult qr = binding.query(Acct_query);
sForce.sObject[] records = qr.records;
Please advise.