内容类型字段+ customXMLParts +文档自定义属性 [英] Content type fields+customXMLParts+ document custom properties

查看:216
本文介绍了内容类型字段+ customXMLParts +文档自定义属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将我的自定义内容类型与我的共享库中的文档库相关联,并且每种内容类型都与一个模板相关联.

I have associated my custom content type with my document library in sharepoint, and each content type is connected with a template.

有没有一种方法可以使用"office js"访问内容字段值,以便可以通过代码更新我的内容字段值?

Is there a way that I can access content fields values with 'office js' so that I can update my content fields values by code?

我尝试了"CSOM",我可以访问这些字段并可以进行编辑,但是当我保存时,出现错误消息,提示该文档正在使用中或被他人锁定.

I tried 'CSOM', I can access the fields and can edit, however when I save I got error message saying the document is in use or is locked by another person.

注意:使用"context.document.properties",我只能访问内建属性,而使用"context.document.properties.customproperties",我只能访问"ContentTypeId".

Note: with 'context.document.properties' I can only access the buildin properties while with 'context.document.properties.customproperties' I can only access 'ContentTypeId'.

请有人分享一些灯光,谢谢!

Please someone share some lights, thanks!

ct字段显示在文档属性中

推荐答案

问题写得不清楚,以了解您要查找的内容.文档库属性不会显示为默认或自定义属性的一部分.这些只是文档(内置或自定义)中定义的key:value对.您需要查看自定义XML部分以访问保存到文档中的SharePoint文档库属性.我对Word API不太确定.为此,您可能需要查看v1.0下的

The question is not clearly written to understand what you are looking for. The document library properties don't show up as part of default or custom properties. These are simply key:value pairs defined in the document (built-in or custom). You'd need to look at the custom XML parts to access the SharePoint document library properties that are saved to the document. I'm not very sure about the Word APIs. For that you may need to look under the v1.0 API set to access doc library properties

这篇关于内容类型字段+ customXMLParts +文档自定义属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆