Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 55831

How to set value in lookup field in CRM 2015

$
0
0

Dear Experts,


I am trying to set value in lookup field in CRM 2015 using following code but the value is not setting in it...


var lookupData = new Array(); 
var lookupItem = new Object(); 

var lookup = Xrm.Page.getAttribute("new_insuredmemberid").getValue(); 

if (lookup != null) { 
if (displayvalue != '') { 
lookupItem.id = lookup[0].id; 
lookupItem.typename = lookup[0].typename; 
lookupItem.name = displayvalue; 
lookupData = lookupItem; 
lookup = lookupData; 

Xrm.Page.getAttribute("new_insuredmemberid").setValue(lookup); 
}

Please suggest where i'm missing in the code.

Thanks in advance


Viewing all articles
Browse latest Browse all 55831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>