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?