CRM js删除OptionSetValue中的字段属性

//隐藏字段属性

Javascript – Control OptionSet values | Microsoft Dynamics 365

removeOption (Client API reference) in model-driven apps - Power Apps | Microsoft Docs

formContext.getControl(arg).removeOption(value);
function OptionSetValueOnload(){
    var optionSetValueList = Xrm.Page.getAttribute("new_hobby").getOptions();
    for (var i in optionSetValueList)
    {
        if (optionSetValueList[i].text == "RAP")
        {
            Xrm.Page.getControl("new_hobby").removeOption(optionSetValueList[i].value);
        }
    }
 }

おすすめ

転載: blog.csdn.net/qq_41863100/article/details/102727535