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
ReplyDeleteHi Sushma, You can use this,
Deletehttps://santoshmscrm.wordpress.com/2015/06/22/how-to-retrieve-lookup-name-and-id-through-plugin/
Hello, 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.
ReplyDeleteVery helping
ReplyDeletegetting error at array
ReplyDeletecannot create a instance of abstract class or interface "system.array"
Hi,
ReplyDeleteI was wondering if it was possible to go through each object in a lookup table and save them to an array?
The purpose is that I want a lookup table to contain each customer account codes, when a user tries to create a new account it will compare against the account codes in the lookup to see if it already exists?
Thanks
Can any one tell me how i can autopopulate the value of a lookup depending upon the value of another lookup. For example, I have two lookups, country and state. If I select a country, then the value of state must autopopulate only if there is one state associated with the country. If there are more than one states associated then it need not autopulate.
ReplyDeleteHi, Not sure which version you are trying. These 2 posts are related to CRM 2011. Please take a look - http://crmdm.blogspot.com/2011/04/lookup-fitering-feature-in-crm-2011-or.html and http://crmdm.blogspot.com/2011/05/lookup-filtering-in-crm-2011-using.html
ReplyDeletethanks, please help me.
ReplyDeletei have crm2011 the example runing pefect.
var lookuptextvalue = lookUpObjectValue[0].name;
i like return other field.
var lookuptextvalue = lookUpObjectValue[0].new_namecustom; not return data.
i need create lookup(oportunitid,namereturnfieldcustom)
i have fiel enty custom field search type.
i select oportuni
i like saveform the field fill other field enty oportunid my field new_namecustom