Document Location

Document Location

?What is Document Location Entity in Dynamics 365?

Document Location Entity: In Dataverse, a Document Location is an entity that represents the link between a record (e.g student ) and its corresponding folder in SharePoint. Each document location includes details like the relative URL of the SharePoint folder and a reference to the related Dataverse record.

?

How Document Location works in Dynamics 365 with SharePoint Integration

When you integrate Dynamics 365 with SharePoint, the integration helps store documents associated with records in SharePoint document libraries. The system uses Document Locations in Dataverse to map each record in Dynamics to its corresponding folder in SharePoint.

By default, when a user navigates to the Documents tab of a record in Dynamics 365 for the first time, the system automatically creates the folder in SharePoint and the corresponding document location record in Dataverse.

?

Stages/ Hierarchy of Document Location

In Dynamics 365, document management with SharePoint is organized through a hierarchical structure that involves different levels of document locations.

Stage 1 Document Location Record (Default Site)

It includes details such as the SharePoint URL and other settings related to integration.

This is typically the top-level record in the hierarchy.

It specifies the default SharePoint site used for document management.

Default site is automatically created when SharePoint integration in enabled

?

?

?

?

Stage 2 Entity Document Location

This stage acts as the parent document location record for managing documents related to specific entities.

Parent Site or Location: Points to the document location record from Level 1 (Default Site). This establishes the connection between the top-level site and the entity-specific document locations.

Relative URL: This field contains the logical name of the entity, such as student entity. This indicates where the documents related to that entity will be stored within the SharePoint site.

?

?

?

On this stage Document library with name of entity (student) will create in SharePoint. Which will further contain files or folders

?

?

?

?

Stage 3 Document Location (Entity Record)

Stage 3 represents the specific document location records that are directly related to individual entity records (e.g student).

Regarding: Field specifies the Dynamics 365 entity record to which this document location is related.

For example, if this stage 3 document location is for a student, the Regarding field would reference that specific account record

Relative URL:? This field contains the path to the specific folder in the entity's SharePoint library. ?By default, the folder is named using a combination of the entity's record name and its GUID.

?

?

?

?

How manually Document Location is Created

When a record is created in Dataverse Document location record is not created until Related->Document tab is clicked. Here student records are created.

?

?

?

On clicking Documents tab record a document location is created. Which also creates a folder in SharePoint where files will be uploaded. The first record created at first time on click tab which define parent site. The second record defines this created record is associated with which SharePoint folder. Relative URL is the folder created on SharePoint (Name_ Guid) of record

?

?

?

?

On clicking upload from grid file upload to SharePoint folder

?

?

?

SharePoint Folder Name Follow convention as (Name_Guid) of record

?

Creation of Document Locations Using Power Automate

Power Automate can be used to create document location on creation of record and can be used to define own folder name ?and link that folder with created record.

?

Steps to Create Document Location using power automate on Creation of Record.

1)Add trigger when a row is created

2)Create Folder on SharePoint

3)Getting Parent Document Id

4)Create Document Location Record in Dataverse

5)Relate Created Record with document location

?

?

?

Breakdown of each step

?

When a new student record is created flow will trigger and it will create a folder in SharePoint where files will be stored?

1)?????? Select SharePoint site address and Library (Library is created automatically with table name when SharePoint integration is enabled)

2)?????? Give Path of folder that you want to give like (created folder will be Name_Reference number) of record

?

Expression use in folder path:? concat(triggerOutputs()?['body/crc18_name'],'_',triggerOutputs()?['body/crc18_referencenumber'])???

?

?

?

?

Here we have to get parent document id

Simply Add list row and append fetch xml . In condition relativeurl define logical name of entity. This condition will filter parent document id (which was created first time by clicking document tab).

?

?

?

Create document location record in dataverse.

1)Define Name which is simply Name_Reference number

2) Parent Site or location: ?Entity set name of document location entity ?id of parent document location)

Expression to extract parent document location id from list row

first(outputs('Get_parent_document_id')?['body/value'])?['sharepointdocumentlocationid']

Regarding: Created record entity set (id of created record from trigger)

Relative URl: Folder name that created in SharePoint

?

?

?

?

?

?

Relate created record with created document location

Row ID: Id of Created record of student entity

Relationship: From arrow choose relationship name.

Relate with: Odata Id from previous step (Created Document location)

?

?

?

?

?

When Record in student entity is created it trigger power automate flow and create folder in SharePoint with (Name_Reference Number) and created record in document location which define created record will be associate to which SharePoint folder

?

?

?

By upload files from model driven app it will be uploaded to created folder in SharePoint

?

?

?

?

要查看或添加评论,请登录

社区洞察

其他会员也浏览了