You need to sign in to do that
Don't have an account?
Anita 8
lightning display account name instead of id display on custom field in salesforce
Hello Guy,
I'm tried with this code .
I try to display Account.Name that Billing Account field is look up to account , but when I get it show me as ID .
So I don't know how to display Account Name on custom field instead ID of Account??
Please, help me .
Thanks in advance.
I'm tried with this code .
<aura:attribute name="opp" type="Opportunity"/> <li class="slds-page-header__detail-block"> <p class="slds-text-heading--label-normal accInfoLabel slds-truncate slds-m-bottom--xx-small" title="Billing Account">Billing Account</p> <p> <span title="{!v.opp.Billing_Account__c}">{!v.opp.Billing_Account__c} </span> </p> </li>
I try to display Account.Name that Billing Account field is look up to account , but when I get it show me as ID .
So I don't know how to display Account Name on custom field instead ID of Account??
Please, help me .
Thanks in advance.
If Billing_Account__c is a lookup, then it will show you the ID. To show the name you will have to use Billing_Account__r.Name. I don't know how you prepare the data, but if you use a query, you will have to query this field as well.
All Answers
If Billing_Account__c is a lookup, then it will show you the ID. To show the name you will have to use Billing_Account__r.Name. I don't know how you prepare the data, but if you use a query, you will have to query this field as well.
Thank you so much for your kindly.
Now it's work fine .