# Configuring Hierarchy Structure

Attachments/Documents of Dynamics 365 CRM records can be stored in SharePoint sites on the basis of hierarchy. To achieve this, follow the steps given below:

* Go to **Advanced Settings --> Settings --> Document Management Settings.**

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QoyqUVI8_HaZ9FOSL%2F-M9Q1aQVV-ETNZ89YKma%2F-M9Q7rxYtkAcEwZkrWGb%2FPRE_10.png?alt=media&#x26;token=3d196c72-6bfb-45b9-a049-72e6defc35b7" alt="Configuring Hierarchy Structure"><figcaption></figcaption></figure>

* Select **Entities --> Enter the URL of respective SharePoint site.**

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QoyqUVI8_HaZ9FOSL%2F-M9Q1aQVV-ETNZ89YKma%2F-M9Q7xhmSoRqnwvsa34G%2FPRE_11.png?alt=media&#x26;token=042da486-2a09-4839-8589-5f341ef126f4" alt="Configuring Hierarchy Structure"><figcaption></figcaption></figure>

* Enable the Checkbox **‘Based on Entity’** **--> Select either of the entities, Account or Contact --> Click on Next.**

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QoyqUVI8_HaZ9FOSL%2F-M9Q1aQVV-ETNZ89YKma%2F-M9Q8g-fOk4MNyk0ocuN%2FPRE_13.png?alt=media&#x26;token=5b7ac7f3-4b19-41c9-ace1-e47440e9d584" alt="Configuring Hierarchy Structure"><figcaption></figcaption></figure>

* Click on **Finish.**

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QoyqUVI8_HaZ9FOSL%2F-M9Q1aQVV-ETNZ89YKma%2F-M9Q8w6GhfxAnFlwTvo-%2FPRE_14.png?alt=media&#x26;token=b5e0f612-d0ab-456d-aaa0-de24a729b308" alt="Configuring Hierarchy Structure"><figcaption></figcaption></figure>

* When hierarchy is enabled, the path structure will look as shown below.
* Next, go to **Opportunity --> Select an opportunity --> Click on Attach2Dynamics button --> Drag and Drop required file.**

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QoyqUVI8_HaZ9FOSL%2F-MVWHqFPSsC23UnSu5Dv%2F-MVWI8MtNEyYl5-0Q8fL%2FHow%20to%20Guide_Confg%20Hierarchy%20Structure%205.png?alt=media&#x26;token=4a0fb63b-c2ab-4ff4-b329-356db891f4c6" alt="Configuring Hierarchy Structure"><figcaption></figcaption></figure>

* Next go to SharePoint site. Here, the respective file will be stored in the following manner: **Account > Account Name\_guid > Opportunity > Opportunity Name\_guid.**

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QoyqUVI8_HaZ9FOSL%2F-MVWHqFPSsC23UnSu5Dv%2F-MVWIGPi1pqO4W-8vyvw%2FHow%20to%20Guide_Confg%20Hierarchy%20Structure%206.png?alt=media&#x26;token=b95ac157-46cd-4912-8b70-016e530b1c09" alt="Configuring Hierarchy Structure"><figcaption></figcaption></figure>

{% hint style="success" %}
For any queries, reach out to us at <crm@inogic.com>
{% endhint %}
