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

Get the account name from the ID
I'm very new to lightning components and also development in general...
I'm working on creating a lightning component that displays Account Partners. I am getting a list of AccountPartner records and want to display the account names instead of the ID from AccountToId field.
Is there a way to get and display the name of the account without running another SOQL query?
Hope this makes sense.
Thanks
I'm working on creating a lightning component that displays Account Partners. I am getting a list of AccountPartner records and want to display the account names instead of the ID from AccountToId field.
Is there a way to get and display the name of the account without running another SOQL query?
<aura:iteration items="{!v.partners}" var="partner"> <-- This is working, but only shows Id--> {! partner.AccountToId} <!-- Doesn't work... {! partner.AccountToId.Name} --> </aura:iteration>
Hope this makes sense.
Thanks
SELECT Partner.AccountTo.Name From Partner WHERE AccountFrom.Id = Case.AccountId LIMIT 1
https://success.salesforce.com/answers?id=9063A000000e80kQAA
All Answers
{! partner.AccountTo.Name}
SELECT Partner.AccountTo.Name From Partner WHERE AccountFrom.Id = Case.AccountId LIMIT 1
https://success.salesforce.com/answers?id=9063A000000e80kQAA
Or also here:
Select AccountTo.Name, AccountFrom.Name, Role From Partner Where
https://developer.salesforce.com/forums/?id=906F000000092LzIAI