views:

36

answers:

2

Hi

I am having a problem using Adobe Air to get contact information.

If I import the contacts from Saleforce all I get is the Id of the Account to which they belong.

How do I convert this Id to the Account Name.

There are similar problems with other objects like Cases, Opportunities, etc where key fields like Owner, Account, etc just contain the Id of the parent object.

Thanks for any help

Roy

+1  A: 

If you're using the query call to fetch the data, then you can use a feature called SOQL-R to fetch related data as part of that query. e.g. this query will return both the contact's name field, and the name field from the related account.

select name, account.name from contact

you can use this for almost all foreign key fields, e.g.

select name, account.name, lastModifiedBy.alias, account.owner.name from contact

The SOQL-R reference docs has more info & samples.

superfell
Thanks, I have already found this and tried to use this, the problem I have is that when my app runs it changes the sql and just puts the Id of the Account instead of the account name, this is the line from the debug:- 14:55:06.592 [INFO] com.salesforce.query.QueryConverter convert:: SOQL: [select Name, Account.Name from Contact] TO SQL: [select Salutation, FirstName, LastName, AccountId from Entity_Contact]
Roy
+1  A: 

Hey Roy, check the answer to this question over here: http://stackoverflow.com/questions/3906447/adobe-salesforce-problem-changing-id-to-name/3937825#3937825

Dave Carroll

related questions