简体   繁体   English

如何使用CSOM更改分类法中名称的大写?

[英]How to change capitalization of a name in taxonomy using CSOM?

Does anyone know how to use CSOM to update a taxonomy item (ex. term group, term set) name capitalization? 有谁知道如何使用CSOM更新分类项目(例如术语组,术语集)的名称大写吗? For example, there is one term group named 'kelvin', how to change it to 'Kelvin'? 例如,有一个术语组名为“开尔文”,如何将其更改为“开尔文”?

Here is my code, 这是我的代码,

var termGroup = termStore.GetGroup(id);
context.Load(termGroup);
context.ExecuteQuery();

termGroup.Name = "Kelvin";
termStore.CommitAll();
context.ExecuteQuery();

There is no error or exception, but the name does not get updated. 没有错误或异常,但是名称没有更新。

Any help would be appreciated. 任何帮助,将不胜感激。 Thanks! 谢谢!

Rename the term group to something else different and change back to the correct name with correct casing. 将术语组重命名为其他名称,然后使用正确的大小写改回正确的名称。 I found out that you don't need to do this for Term set 我发现您不需要为术语集执行此操作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM