superfell / zkSforce

Cocoa library for calling the Salesforce.com Web Services API
https://pocketsoap.com/osx/zksforce/
MIT License
76 stars 27 forks source link

search: error #47

Closed SteveDCronin closed 5 years ago

SteveDCronin commented 5 years ago

Simon - with no examples to learn from it is turning out to be painstaking to try to use zkSforce - although I can appreciate that it a robust and powerful too!

Is there a document or tool which would help a saleforce beginner but experienced Cocoa developer learn how to use this tool?

NSString *sqlString = [NSString stringWithFormat:@"SELECT Id, AccountNumber, Name FROM Account"];
NSArray *results = [self.sforceClient search:sqlString];

MALFORMED_SEARCH: No search term found. The search term must be enclosed in braces.

Huh?

superfell commented 5 years ago

You need to call query not search. The best thing to read is the salesforce soap api documentation

On Jul 14, 2019, at 8:25 PM, Steve Cronin notifications@github.com wrote:

Simon - with no examples to learn from it is turning out to be painstaking to try to use zkSforce - although I can appreciate that it a robust and powerful too!

Is there a document or tool which would help a saleforce beginner but experienced Cocoa developer learn how to use this tool?

NSString sqlString = [NSString stringWithFormat:@"SELECT Id, AccountNumber, Name FROM Account"]; NSArray results = [self.sforceClient search:sqlString]; MALFORMED_SEARCH: No search term found. The search term must be enclosed in braces.

Huh?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

SteveDCronin commented 5 years ago

I have read parts of it

The disconnect comes in not understanding how the API translates to ZKS..

The example above is instructive.... How do I understand by reading the API docs that I should use 'query' not 'search' in ZKS?

superfell commented 5 years ago

At the top level it’s a straight mapping, the query method on the client calls the query API, etc. The Select ... string you have is a SOQL query, I’m don’t know where you got it from, but one you know it’s SOQL the docs point you at the query method.

superfell commented 5 years ago

You might find this page helpful if you haven’t seen it yet. https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_list.htm

SteveDCronin commented 5 years ago

Seems helpful.... Thanks for your promptness..