Thanks andrew it worked for me. but i am facing problem while returning the value to another function from this place .
Below are my two functions
PPayment_onChange: function(executionContext)
{
formContext = executionContext.getFormContext();
if(formContext.getAttribute("id").getValue()!=null)
{
var p=formContext.getAttribute("rcm_pid").getValue()[0].id;
var E=formContext.getAttribute("rcm_eid").getValue()[0].id;
p = p.replace(/[{}]/g, "");
var PEid=PPayment.RetriveData(executionContext,p,E);
}
},
RetriveData: function(executionContext,p,E) {
Xrm.WebApi.online.retrieveRecord("PEntity", "" + p + "", "?$select=name,_e_value")
.then(
function success(result) {
return result._e_value;
},
function (error) {
Xrm.Utility.alertDialog(error.message);
}
);
},
i need the _e_value in "var PEid" of first function
i wrote above code but not getting anything.