http://crmdm.blogspot.com/2011/06/how-to-retrieve-lookup-attribute-from.html
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;
}
}
I want to retrieve lookup value from .net code
ReplyDeleteHello, You could use entityreference. I have done a new post. pls check the same.
ReplyDeletehttp://crmdm.blogspot.com/2011/06/how-to-retrieve-lookup-attribute-from.html
Hi Manjaly, thanks for posting this great but simple post. I would like to get another attributes value from lookup field base entity. let's say I have contact lookup field in my account form and I want to insert contact's address into address field in my account form when contact lookup is onchange. Can I use jscript to do that, do you have any sample? thanks in advance.
ReplyDelete