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

get Value of look up fields from another record

$
0
0

I have wrote a Jscript to get value of fields from another opportunity record. The values shown only for text fields but can anyone suggest me how to get values from lookup and optionset fields and insert them into similar fields. 

var lookup = new Array();
        lookup[0] = new Object();
        lookup[0].id = opportunity.OpportunityId;
        lookup[0].name = opportunity.Name;
        lookup[0].entityType = "opportunity";
        Xrm.Page.getAttribute("new_masteropportunity").setValue(lookup);

        Xrm.Page.getAttribute("new_topic").setValue(opportunity.Name);
        Xrm.Page.getAttribute("new_street1").setValue(opportunity.new_street1);
        Xrm.Page.getAttribute("new_city").setValue(opportunity.new_city);      



Viewing all articles
Browse latest Browse all 46379

Trending Articles



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