如何通过 javascript in select list in crm 保存数据
how to save data through javascript in select list in crm
我正在我的网络资源中添加一个选择列表,然后像这样通过 JavaScript 保存数据
entity.attributes['new_category'] = categoryValue;
其中
categoryValue = $("#category option:selected")[0].innerHTML
但是当我创建像
这样的实体时
XrmServiceToolkit.Soap.Create(entity)
it is throwing me and error
当尝试使用 XrmServiceToolkit
分配选项集值时,new_category
看起来确实如此,您需要像这样分配值:
entity.attributes["new_category"] = { value: categoryValue, type: "OptionSetValue" };
我正在我的网络资源中添加一个选择列表,然后像这样通过 JavaScript 保存数据
entity.attributes['new_category'] = categoryValue;
其中
categoryValue = $("#category option:selected")[0].innerHTML
但是当我创建像
这样的实体时XrmServiceToolkit.Soap.Create(entity)
it is throwing me and error
当尝试使用 XrmServiceToolkit
分配选项集值时,new_category
看起来确实如此,您需要像这样分配值:
entity.attributes["new_category"] = { value: categoryValue, type: "OptionSetValue" };