I am adding a selectlist in my web resource and then saving the data through JavaScript like this
entity.attributes['new_category'] = categoryValue;
where
categoryValue = $("#category option:selected")[0].innerHTML
But when i am creating the entity like
XrmServiceToolkit.Soap.Create(entity)
当尝试使用XrmServiceToolkit
分配选项集值时, new_category
看起来确实像这样,您需要像这样分配值:
entity.attributes["new_category"] = { value: categoryValue, type: "OptionSetValue" };
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.