Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Create Folder in Sharepoint when new Company is created

(0) ShareShare
ReportReport
Posted on by 129

Hello everyone,

my business case in short:

I am creating a new customer in dynamics, a folder for this customer is created automatically based on the set-up of the sharepoint integration.

Additionally, I need to create two folders automatically for every company at the sharepoint location of the new customer.

I am trying to achieve this using microsoft flow.

My flow works and creates a folder in sharepoint for every new company BUT the folder is not at the location of the new dataset but at he general site.

I need to see the folder at the new customer.

How can I achieve this?

I guess the "Folder path" in the flow needs to be dynamic? How would I set that up correctly though.

Any help appreciated.

Best regards,

Daniel

*This post is locked for comments

  • Community Member Profile Picture
    on at
    RE: Create Folder in Sharepoint when new Company is created

    Hi Daniel,

    Selecting Flow is a very good option here. I worked on similar problem before.

    What you need to do is construct the exact url of that customer folder location (look at an existing url for the full path). The first half of this url should be static and the second half is the folder name which which you need to construct from values of the record (name, id).

    For the second half (the folder name), I believe it is the name of the customer record then "_" and then the guid (id) of that customer. When you match the folder name exactly, Sharepoint will use that path and not create duplicates. It is a bit of work for sure but Flow supports it all.

    ** Note1:

    If you by customer, you mean accounts or contact, then your Flow needs to do the logic based on the type. The only difference will be the url for contact will have "https:.......//contacts//foldername" and for accounts it will have "https:/...../accounts/foldername

    **Note2: When you construct the folder name, don't forget to encode the full string so that if the name contains some unwanted special characters, nothing breaks. For this, use the EncodeUrl function that comes with Flow.

    Thanks

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans