Friday, June 8, 2012

How to set Option set value to null CRM 2011


Option set does not accept NULL to clear its value so you need to write the code like below

function clearOptionSetValue()
{
var Prioritycode = Xrm.Page.data.entity.attributes.get("prioritycode");
Prioritycode.setValue(null);
}