• Mindes
  • NEWBIE
  • 0 Points
  • Member since 2019
  • IT Manager

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
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.
 
({
    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,
 
  • October 21, 2020
  • Like
  • 0
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.
 
({
    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,
 
  • October 21, 2020
  • Like
  • 0