Hi all,
I am using the following code to retrieve the value of an option set field
I have try " var chm_Reservation = results[i].chm_Reservation.Value;"
but is not working. Any ideas ?
Thank you
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
datatype: "json",
url: Xrm.Page.context.getClientUrl() + "/XRMServices/2011/OrganizationData.svc/chm_quotemultitankdetailsSet?$select=chm_Reservation",
beforeSend: function (XMLHttpRequest) {
XMLHttpRequest.setRequestHeader("Accept", "application/json");
},
async: true,
success: function (data, textStatus, xhr) {
var results = data.d.results;
for (var i = 0; i < results.length; i++) {
var chm_Reservation = results[i].chm_Reservation;
}
},
error: function (xhr, textStatus, errorThrown) {
alert(textStatus + " " + errorThrown);
}
});