Hi,
I am using CRMRestKit solution to make crossentity operations with jscript easier for me. I am able to retrive value of string fields from other entity based on its guid (which I get from current form of incident entity), but I can't get value of an option set from other entity. My code is:
function SetContactPreferences() { if (Xrm.Page.getAttribute('customerid').getValue() != null) { CrmRestKit.Retrieve('Account', Xrm.Page.getAttribute('customerid').getValue()[0].id, ['new_optionset1']).fail(window.globalFail).done(function (data) { alert(Xrm.Page.getAttribute('data.d.new_optionset1').getValue()); }); } }Using this one I get an error that the object is empty or undefined. When I usegetAttribute method without inverted commas:
Xrm.Page.getAttribute(data.d.new_optionset1).getValue());
I get an error that the Object does not provide 'getValue' property or method. Is there a way to get the value of optionset using CRMRestKit? I couldn't find the sample of retrieving data from this type of fields. I would be grateful for your help.