Hi All,
Please have a look on this simple code:
function getLookupDetails() {
var res = Xrm.Page.getAttribute("new_mcdetailid").getValue()[0].Name;
console.log(res);
}
this is running on onChange event of the lookup field named new_mcdetailid, and upon execution, I got 'res' variable come as 'undefined' but it should have 'name' property of the selected record of this lookup field. So where I am going wrong?
My task is to get selected value from this lookup and then fetch some values from another entity based on this selection, so If anybody can suggest full code (my task is to do it only using JavaScript), I shall be grateful.
Thanks in Advance
*This post is locked for comments