Hello Everyone !
im trying to retrieve a information that is located in a entity and populate in a field in another other entity but my code its not working can anyone see why ?
function getcep(executionContext) {
var attribute = executionContext.getEventSource();
var CEP = attribute.getValue();
SDK.REST.retrieveMultipleRecords("crd4c_cep", "?$select=crd4c_Logradouro&$filter=crd4c_CEP eq '" + CEP + "'", function (results) {
alert("CEP: " + CEP);
var crd4c_Logradouro = results[0].crd4c_Logradouro.crd4c_Logradouro.value;
Xrm.Page.getAttribute("crd4c_Logradouro").setValue(crd4c_Logradouro);
}, function (error) {
Xrm.Utility.alertDialog(error.message);
}, function () {
//On Complete - Do Something
});
}
*This post is locked for comments