Hi All,
I am using the following code to retrieve and set a value on the record using Client WebAPI JS. The retrieved field is an option set and the returned value is a number. My question how do i get text instead of number.
function updatereqppr(executionContext){
debugger;
var formContext = executionContext.getFormContext();
if(formContext.getAttribute("iis_projectid").getValue()[0].entityType =="iis_project"){
var record_id=formContext.getAttribute("iis_projectid").getValue()[0].id;
Xrm.WebApi.retrieveRecord("iis_project",record_id,"?$select=iis_financing").then(
function get_pvalue(data){
var f_value = data["iis_financing"];
formContext.getAttribute("iis_financing@OData.Community.Display.V1.FormattedValue").setValue(f_value);
});
}
}