AnsweredAssumed Answered

Getting related calls from Accounts in sidecar

Question asked by sidhu sidhu on Oct 19, 2016
Latest reply on Oct 21, 2016 by sidhu sidhu

Hi All,

 

 

           I was trying to get the related calls for Accounts

 

And this is what i have done

 

var accountsData=app.data.createBean('Accounts',{id:'2d4813e2-c081-92f6-16fa-57600f3c3b3'});
var fad=accountsData.fetch();
fad.xhr.done(function(){

 

  var callData=app.data.createBean('Calls',{parent_id:'2d4813e2-c081-92f6-16a-57600f3c3b35'});
  var fcd=callData.fetch();
  fcd.xhr.done(function(){

 

           console.log(JSON.stringify(callData));//But this is bringing the calls for which the Account is not related to.Can any one help me where i am wrong

 

      });

 

});

 

And is there any other way i can do this with out using two request.

Like getRelatedCollection.

 

 

Regards
Sidhu

Outcomes