Code Snippet:
var lookupObject = Xrm.Page.getAttribute("yourlookupattributename");
if (lookupObject != null)
{
var lookUpObjectValue = lookupObject.getValue();
if ((lookUpObjectValue != null))
{
var lookuptextvalue = lookUpObjectValue[0].name;
var lookupid = lookUpObjectValue[0].id;
}
}
No comments:
Post a Comment