Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Unable to get a Document Location created for Opportunity in Dynamics 365

There is a requirement to segregate the documents for all the opportunities into various regions(Asia Pacific, EMEA, Americas, Australia/Oceania)

1. I have completed the Document Management settings under integration settings for my Environment.

2. SharePoint site is created

3. Different libraries for above mentioned regions are created.

4. I have added a mandatory field "Region" for "Opportunity" entity and added it to different forms via PowerApps.

5. When a "Opportunity" is created in Dynamics 365 I have created a flow which checks for When a record is created(Current environment trigger)

It checks the value of the Region field in Switch condition

Next for every value of Region I have added a step to create a folder name with the "Opportunity Topic" (This completes without any error)

Next step is to create a new Document Location for above created folder and associate it with newly created Opportunity so that the Associated document grid will refer to the SharePoint folder.


Please help which all fields should I provide values for in the below screenshot.

I tried giving the Opportunity itself but getting error.



have you read Stefan Straub’s blog? I have followed his steps and they worked great

he shows what fields need to be populated on the document location 


@Vaibhav1989  if this meets your needs please give it a thumbs up or mark as solution 

Thanks jlindstrom.

I have gone through this article.

I am new to Dynamics 365 and unable to figure out what exactly is provided in 'Regarding(Opportunities)', Parent Site or location (SharePoint Sites) fields.

Not sure if the fields expect ID (sharepoint id or cds id) string input and which all fields combine to make exact URL of the document location. 

My SharePoint site registered in Dynamics is

Document library is 'Opportunity'

For every new opportunity created I want the associated folder under

For example , a new opportunity "Azure Site Recovery Configuration for ABC Corp"


Helpful resources

2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,552)