0

我无法让选项集字段填充。我必须在子帐户上将选项集值设置为设施或供应商,具体取决于父帐户类型是设施还是供应商。

function SetOptionSetField(accountType)
{
    var options = Xrm.Page.getAttribute(new_type).setValue(100000002, 100000003);

    if (accountType === 100000000) {
        new_type.setValue(100000002);
    }
    else if (accountType === 100000001) {
        new_type.setValue(100000003)
    }
}
4

1 回答 1

1

我假设new_type是一个属性的名称。尝试这个:

function SetOptionSetField(accountType)
{
    var typeField = Xrm.Page.getAttribute("new_type");

    if (accountType === 100000000) {
        typeField.setValue(100000002);
    }
    else if (accountType === 100000001) {
        typeField.setValue(100000003)
    }
}
于 2015-09-14T19:28:42.940 回答