如何使用CRM API获取与实体记录相关的文档列表? [英] How to fetch list of documents related to the entity record using CRM APIs?

查看:101
本文介绍了如何使用CRM API获取与实体记录相关的文档列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是我们CRM实施中的确切情况.

我们创建了一些自定义实体,并为它们启用了文档管理".现在,我们需要使用CRM REST API获取每个实体记录的所有文档(及其完整URI)列表.

我试图调查实体,但不确定要查询哪个实体以获得与实体记录关联的文档(及其URI)列表.

我们的文档正通过SharePoint网站中的文档库存储.

有人可以在这里建议吗?

谢谢

解决方案

查询 SharePointDocumentLocation 实体,其中regardingobjectid将是您要为其获取文档位置的记录的ID.

使用SiteCollectionId属性并查询SharePointSite实体来获取匹配的站点并通过将SharePointSite实体的AbsoluteUrl属性附加到文档位置实体的RelativeUrl属性来构造URL. /p>

Following is the exact scenario in our CRM implementation.

We have created a few custom entities, and enabled "Document Management" for them. Now, we need to get list of all documents (with their full URIs) for each entity record using CRM REST APIs.

I tried to look into the entities, but not sure which entity to query in order to get list of documents (and their URIs) associated with an entity record.

Our documents are getting stored over document library in the SharePoint site.

Could anyone please suggest here?

Thanks

解决方案

Query the SharePointDocumentLocation entity where the regardingobjectid would be the id of the record you want to fetch the document locations for.

Use the SiteCollectionId property and query SharePointSite entity to get the matching site and construct the url by appending the AbsoluteUrl property of the SharePointSite entity with the RelativeUrl property of the document location entity.

这篇关于如何使用CRM API获取与实体记录相关的文档列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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