问题
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
回答1:
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.
来源:https://stackoverflow.com/questions/41437535/how-to-fetch-list-of-documents-related-to-the-entity-record-using-crm-apis