I have a Web resource which has a option set(1.Apple, 2.Orange, 3.Plum). When I select any of these options in Html web resource, I am able to save that in CRM option set field.
function fruitSelected(selected){
var selectedFruit = selected.options[selected.selectedIndex].text;
setOptionSetValue("fieldname", selectedFruit);
}
function setOptionSetValue(fieldname, selected) {
var options = Xrm.Page.getAttribute(fieldname).getOptions();
for (i = 0; i < options.length; i++) {
if (options[i].text == selected) {
Xrm.Page.getAttribute(fieldname).setValue(options[i].value);
}
}
}
At the same time I need to retrieve the saved option set from CRM and display it in Web resource, just to use it after refresh or save.
I tried
var attribute = Xrm.Page.getAttribute('new_customerseverity').getoption(value);
This is not helping me to get the saved option set value. Can someone help me in this
*This post is locked for comments
I have the same question (0)