
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
I have the same question (0)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