How to set Sharepoint document location in a field dynamically in Dynamics 365

0

So, I recently had this requirement to put the SP document location in a field and show it on the Contact form. And I had to do it OOTB way. After some time of playing around with the D365 workflow, I found a way to do it. Yay! 🙂

First, make sure to

  1. Enable Server-side Sharepoint Integration.
  2. Enable document management for your desired entity.
  3. Take note of the absolute URL of your Sharepoint directory. It looks something like this: https://contoso.sharepoint.com

Once you have Sharepoint side set up, let’s do some config! 🙂

  1. Create a field where you would like the link to appear on. In this case, I created a single line of text field with format URL and put it on the form.

2. Create a workflow. The important thing to note here is that the workflow should run on the Document Location entity.

3. Create a step to update the record of whichever entity you enabled document management on. In my case, it is Contact.

4. Inside the workflow designer, select the field you created on Step 1 and paste the URL of your sharepoint directory and add a “/” character.

5. Once you’ve done that, select this field from the Form Assistant and it on the field after the “/”.

6. Once you’ve mapped the field from Step 5, add another “/” character.

7. Select this field from the Form Assistant and add it after the second “/” character.

8. Select Save & Close and activate your workflow.

9. Now this link will be added dynamically on the form 🙂

 

Choose your Reaction!
Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.