To complete our scenario from the previous blog post, we have to create Flow number 2:
On status change of the lead: if qualified, then set the regarding field at the document location record to the qualifying opportunity.

Here is the overview of the Flow:

When a Lead is qualified, the Qualifying Opportunity field is populated, so we use this field as Attribute Filter in the trigger When a record is updated.

Then we get a list of Document Locations regarding the qualified lead that have the Sales Number of the lead as Relative URL. For every Document Location the Regarding field is update with the Qualifying Opportunity and Regarding Type field to opportunities.

Now when the lead is qualified and we open the related Documents at the qualifying opportunity, the sales documents of this sales are available.

I did it my way, you can do it your way. It’s just to show that you can introduce your own logic to the creation/integration of SharePoint Document Locations, so you don’t have to accept the funny folder names and “logic structure” of the standard integration.

The post Automate SharePoint Document Locations creation in Dynamics 365 CE your way with Flow (2) appeared first on There's Something About Dynamics 365.