I use the SELECT query to download contacts from Salesforce.com. As it is given below and i am getting “MALFORMED_QUERY” exception

StackOverflow https://stackoverflow.com/questions/4366492

  •  09-10-2019
  •  | 
  •  

문제

I use this select query and i am not getting what's the wrong with this.

Select Id,Contact.FirstName,Contact.LastName,Contact.Title,Contact.Department,Contact.Birthdate, Contact.Phone,Contact.HomePhone,Contact.MobilePhone,Contact.OtherPhone,Contact.Fax,Contact.Email,Contact.MailingStreet, Contact.MailingCity,Contact.MailingState,Contact.MailingCountry,Contact.MailingPostalCode,Contact.OtherStreet, Contact.OtherCity,Contact.OtherState,Contact.OtherCountry,Contact.OtherPostalCode,Contact.Description,Contact.Account.Name From Contact where strcmp('%@',Id) = -1",lastcontactId

도움이 되었습니까?

해결책

You need to generate a query that uses =, e.g.

select name from contact where id='005123123123123123'

so, you can use this to generate the query.

NSString *query = [NSString stringWithFormat:@"select name,etc from contact where id='%@'", lastContactId];

Here's the SOQL docs which has more examples.

And if you're trying to do paging, you should just run the entire query and use query/queryMore to page through the results.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top