Hi
I am using CRM 2011 on -premises and I am trying to retrieve primary contact's phone number from account in CASE entity.
In case entity I would like to get the contact Name, and contact phone number of the person who is a primary contact of Account, I like this to populate when user selects account.
Would be great if someone help me or direct me on this I am not a good programmer but could try my head around.
Currently I can access the name of the account using below code but I dont know how I can get the parentcontactid and details using Jscript I preume I might need to use soap but dont know how.
function getDetails(){
var lookupItem = new Array();
lookupItem = Xrm.Page.getAttribute("customerid").getValue();
if (lookupItem[0] != null)
{
var name = lookupItem[0].name;
var guid = lookupItem[0].id;
var entType = lookupItem[0].entityType;
alert(name);
alert(guid);
alert(entType);
}
}
Fkhoja