我可以通过代码在SharePoint Online中创建一个企业关键词吗?

huangapple go评论50阅读模式
英文:

Can I create an Enterprise Keyword by code in SharePoint Online?

问题

在SharePoint中,有一个名为“Enterprise Keyword”的属性,您可以通过输入一些随机名称来创建一个,然后将其分配给其他文件。
我想知道是否有一种通过代码创建新的企业关键字的方法,最好是在JavaScript中,但如果不可能的话,可以使用任何可以实现的语言。

谢谢!

英文:

In SharePoint, there is a property called "Enterprise Keyword", you can create one by writing some random name and then you can assign it to other files.
And I wanted to know if there is some way to create a new Enterprise Keyword by code, preferable in JavaScript but if is not possible then whatever language that it works.

Thank you!

答案1

得分: 1

有不同的方法可以通过代码创建一个新的企业关键字,具体取决于您的场景和偏好。

一种选择是使用JavaScript对象模型(JSOM),它是一组JavaScript类和方法,您可以使用它们与SharePoint数据和服务进行交互。您可以使用JSOM向列表或库添加一个企业关键字列,然后为每个项设置列的值。您可以参考这篇文章来了解如何使用JSOM来实现这个目的。

另一种选择是使用SharePoint REST API,这是一个Web服务,您可以使用它来执行对SharePoint数据和服务的CRUD操作。您可以使用REST API来创建或更新带有企业关键字值的项。您可以参考这篇帖子来了解如何使用REST API来实现这个目的。

英文:

There are different ways to create a new Enterprise Keyword by code, depending on your scenario and preferences.

One option is to use the JavaScript Object Model (JSOM), which is a set of JavaScript classes and methods that you can use to interact with SharePoint data and services. You can use JSOM to add an Enterprise Keyword column to a list or library, and then set the value of the column for each item. You can follow this article to learn how to use JSOM for this purpose.

Another option is to use the SharePoint REST API, which is a web service that you can use to perform CRUD operations on SharePoint data and services. You can use the REST API to create or update an item with an Enterprise Keyword value. You can follow this post to learn how to use the REST API for this purpose.

huangapple
  • 本文由 发表于 2023年7月10日 19:31:22
  • 转载请务必保留本文链接:https://go.coder-hub.com/76653300.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定