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

How can I get other fields' value of recordId attribute in Lightning component?
Hi all,
How can I get other fields' value of recordId attribute in Lightning component?
For instance, recordId of Opportunity, want to get AccountId of this opportunity
How can I get other fields' value of recordId attribute in Lightning component?
For instance, recordId of Opportunity, want to get AccountId of this opportunity
For example for opportunity, you can directly access Opportunity Account ID. A very simple example.:
No Apex needed. If you need more insight, feel free to ask.
Cheers, Dev
All Answers
Please try this code :
In Component use force: hasRecordId :
Helper Code :
Apex Class :
Hope it Helps you. Please mark this as solved so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.
Regards ,
Suraj
In order to get the AccountId and its data from opportunity Id, you need to write a SOQL query for that.
Regards ,
Suraj
For example for opportunity, you can directly access Opportunity Account ID. A very simple example.:
No Apex needed. If you need more insight, feel free to ask.
Cheers, Dev
I am sorry I didnt get what you mean by iterating {!v.OpttyRecord}. Could you elaborate your use case. JFYI, OpptyRecord is one object entity here, not a list.
How can get Selected fields of Account Object into a Lightning Component. I have to use that component to add it to Account record detail page as a new tab.?
Give me a small example for this. I want to get field values and keep in a component.
Can we get the value of account in helper function as well???