web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Documents in Accounts in dynamics 365

(0) ShareShare
ReportReport
Posted on by 1,085

Hello Community Experts,

There is an urgent requirement where, when a file is uploaded in Account Entity of dynamics 365, when a folder gets created for it sharepoint, it should be in the form of Account Name] [_] [Account ID] in share point, instead of GUID

Can we achieve this through flow?

Kindly Advise,

Best Regards,

Sumaira Noor

I have the same question (0)
  • Verified answer
    Linn Zaw Win Profile Picture
    3,407 on at

    Yes, it can be achieved using automated flow. You can refer to steps 12 and 13 from my blog below to achieve it.

    1. CDS (current environment) Trigger on Account entity
    2. Get the Account Name and Account ID from the trigger and create the SharePoint folder (as in step 12 from the blog)
    3. Create Document Location for the new SharePoint folder (as in step 13 from the blog)

    http://linnzawwin.blogspot.com/2020/04/upload-sharepoint-documents-for.html#NewSharePointFolder

  • Sumaira Noor Profile Picture
    1,085 on at

    Thanks a lot for the quick response Linn

    Please Advise if I have created it correct?

    Also What should i enter in folder path?

    PA11.PNG

    Kindly Advise

    Best Regards,

    Sumaira Noor

  • Verified answer
    Linn Zaw Win Profile Picture
    3,407 on at

    Since the trigger is on Account entity, you don't need the "Get a record" step. You can just get the necessary data from the trigger.

    You should only run this flow on Create of the Account (not Create and Update). If you need to update the SharePoint folder on update the of the Account Name, you will need another flow for that. Otherwise, multiple folders will be created for any update to the Account.

    In the folder path, add the [Account Name] [_] [Account ID] from the trigger.

    pastedimage1593519595180v2.png

  • Sumaira Noor Profile Picture
    1,085 on at

    Thanks a lot for the response Linn

    I have added your steps to flow and the below two steps after your steps

    Is this correct?

    P12.png

    Please Advise

    Best Regards,

    Sumaira Noor

  • Verified answer
    Linn Zaw Win Profile Picture
    3,407 on at

    For your case, you are creating the document location as soon as the record is created, so you don't have to look for the existing Document Location. You can remove that List records for Document Location step.

    For the Name and Regarding, populate the Account Name and Account GUID from trigger.

  • Sumaira Noor Profile Picture
    1,085 on at

    Thanks a lot for the quick response Linn

    I have added this

    P14.png

    Resource not found for the segment

    I'm getting that error also I was able to create the folder in same format in sharepoint but I cannot find the documents under it still

    This folder is empty and the documents are getting stored in some other folder only

    P15.png

    Kindly Advise

    Best Regards,

    Sumaira Noor

  • Verified answer
    Linn Zaw Win Profile Picture
    3,407 on at

    The new SharePoint folder will only be used in the D365 record when the Document Location is created successfully. That's why it is empty.

    The Regarding (Account) lookup field needs to be set with the entity set name prefix and brackets.

    accounts(<<GUID Value>>)

    You can read more details in the link below.

    linnzawwin.blogspot.com/.../power-automate-how-to-set-lookup-field.html

  • Sumaira Noor Profile Picture
    1,085 on at

    Thanks a lot for the response Linn

    What should i do to move the documents to the new folder?

    P15_2700_.PNG

    Please Guide

    Best Regards,

    Sumaira Noor

  • Verified answer
    Linn Zaw Win Profile Picture
    3,407 on at

    If you can successfully create the Document Locations record in the flow, the system will not automatically generate the [Account Name]_[GUID] folder and all the documents that you upload from the record will just go to the folder created by the flow [Account Name]_[Account ID].

    Since there is only a single folder, you should not have to move the documents.

  • Sumaira Noor Profile Picture
    1,085 on at

    Thanks a lot for the response Linn and sorry for so many questions

    I'm still not able to store the document in new location

    It is getting stored in old folder only where account name is followed by GUID

    Kindly guide

    Best Regards,

    Sumaira Noor

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
iampranjal Profile Picture

iampranjal 41

#2
Martin Dráb Profile Picture

Martin Dráb 38 Most Valuable Professional

#3
Satyam Prakash Profile Picture

Satyam Prakash 35

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans