You need to sign in to do that
Don't have an account?
Mindes
How to get parent.parent field input
Hello,
I can't find access to the second level account record.
On the case record in the lightning component we need to pull Account field and Parent Account field. In first level Account, field is set properly, but not for the second level parent Account. Example below, and input that not working is underlined.
Please advice,
I can't find access to the second level account record.
On the case record in the lightning component we need to pull Account field and Parent Account field. In first level Account, field is set properly, but not for the second level parent Account. Example below, and input that not working is underlined.
({ initialize: function(component, event, helper) { var caseId = component.get("v.recordId"); var action = component.get("c.getAccountInformation"); action.setParams({ caseId }); action.setCallback(this, function(a){ var rtnValue = a.getReturnValue(); var state = a.getState(); if (state === 'SUCCESS'){ component.set("v.AM", rtnValue.Account.Account_Manager__c); component.set("v.ParentAM", rtnValue.Account.ParentId.Account_Manager__c); } else { console.log(a.getReturnValue()); } });
Please advice,
In your apex controller method "getAccountInformation", have you already added this field in the query?
Can you also share your apex controller please
Controller:
i have tried to use as Account.ParentId.* it's not working.
This should fix your problem.