How to get the Lookup field value using JavaScript?


Top_bottom banner

//How to get the Lookup field value using JavaScript?

    var lookupObject = Xrm.Page.getAttribute(“<lookupattributename>”);
    if (lookupObject != null)
    {
        var lookUpObjectValue = lookupObject.getValue();
        if ((lookUpObjectValue != null))
        {
         var lookuptextvalue = lookUpObjectValue[0].name;
         var lookupid = lookUpObjectValue[0].id;
        }
     }

Please share |Like in Facebook if you feel like this page is useful.

Top_bottom banner

Advertisements

About Dynamics CRM Guru

We are a group of CRM Consultants and have significant experience in transforming businesses in the right way. We use this platform to share our knowledge which might help many others in the digital transformation journey. We are happy to help you if you are looking for any assistance in CRM implementation projects.

Posted on March 12, 2013, in CRM 2011 JScript, Microsoft CRM 2011, MS CRM 2011 Training and tagged . Bookmark the permalink. 2 Comments.

  1. thanks for the useful content

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: