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

Having by using SDK.REST.retrieveRecord()

$
0
0

Hi all

I am using below code

var currentleadId = window.parent.opener.Xrm.Page.data.entity.getId();

var select = "aw_PaymentMethod";
SDK.REST.retrieveRecord(
currentleadId,
"Opportunity",
select,
null,
function (opportunity) {
// This, unsurprisingly isn't working
var addresslookup = opportunity.aw_PaymentMethod;
alert(addresslookup.id);
//var o = opportunity.id;
//Xrm.Page.getAttribute("new_billtocountry").setValue([{ id: addresslookup.Id, name: addresslookup.Name, entityType: addresslookup.LogicalName }]);
},
);

The alert giving me undefined;

Please suggest me Where I am wrong?


Viewing all articles
Browse latest Browse all 46379

Trending Articles



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