Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 55831

Retrieve Option Set Value

$
0
0

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);
    }
});



Viewing all articles
Browse latest Browse all 55831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>