> For the complete documentation index, see [llms.txt](https://docs.inogic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inogic.com/attach2dynamics/configuration/entity-configuration/configuring-hierarchy-structure.md).

# 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-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FXJ4eKlmHJX9uLTsNTMlz%2Fa2d-68.png?alt=media&amp;token=19944627-62a8-479b-81cd-658e44f9f23d" alt="Configuring Hierarchy Structure"><figcaption></figcaption></figure>

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

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2Fh7QNch7mn4fwz9rJqchA%2Fa2d-69.png?alt=media&amp;token=1b17d274-58aa-498c-a15b-ff67b7f277da" alt="Configuring Hierarchy Structure"><figcaption></figcaption></figure>

* Enable the Checkbox ‘Based on Entity’ **-->** Select either of the entities, Account or Contact **-->** Complete the process by clicking on ‘Next’ and ‘Finish’.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FiVaG2rA20SCI4hrzl9iv%2Fa2d-70.png?alt=media&amp;token=887cc146-3079-484f-a7b5-a69c8f2a0546" alt="Configuring Hierarchy Structure"><figcaption></figcaption></figure>

* Click on **Finish.**

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FFCOJ3LBRIeIyLOfP6vlI%2Fa2d-71.png?alt=media&amp;token=84db7857-109e-4066-9043-88e069792bed" alt="Configuring Hierarchy Structure"><figcaption></figcaption></figure>

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

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FoyEeWjPhjfZEgbVAvuio%2Fa2d-72.png?alt=media&amp;token=b808e918-d118-4050-a4a8-48e66c10496b" alt="Configuring Hierarchy Structure"><figcaption></figcaption></figure>

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

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FCPoYWnxrqyZ7YQLiqcqi%2Fa2d-73.png?alt=media&amp;token=b4ded1ad-9c38-4248-94cc-71529fc82bed" alt="Configuring Hierarchy Structure"><figcaption></figcaption></figure>
