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

Query an accounts contact
I'm trying to query an account's contact by recordtypeid and account name. How would my soql statement look? Currently I have this but nothing is returned.
SELECT ID,FirstName, LastName, Primary_Contact_Title__c, Email, Phone, Fax, MailingStreet, MailingCity, MailingState, MailingPostalCode FROM Contact WHERE Account.= '" + strAccount + "' AND RecordTypeId = '" + strRecordTypeId + "'"
Regards
Also, the result set should return error message. Your code should check out error.