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

Create a document location record using Flow/DataVerse

(0) ShareShare
ReportReport
Posted on by 1,589

When users create an opportunity record, I need to create a custom folder in Sharepoint, with several subfolders and then create a document location record that points to the root of it so the sub folders appear in the documents area like what is shown below. 

Screen-Shot-2021_2D00_04_2D00_25-at-1.03.46-AM.png

However I get an error at the very end when I try to create the document location record. 

This is the error I get: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

My flow is shown below.

Screen-Shot-2021_2D00_04_2D00_25-at-12.59.59-AM.png

It creates the SharePoint folders properly. 

Screen-Shot-2021_2D00_04_2D00_25-at-1.06.12-AM.png

However, it does not successfully create the document location record to link the folders due to the error Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

The DataVerse/Flow Action Card that is supposed to create the Document location record is shown below. 

Screen-Shot-2021_2D00_04_2D00_25-at-1.00.46-AM.png

What could I be missing or overlooking? 

I have the same question (0)
  • Verified answer
    ACECORP Profile Picture
    1,589 on at

    I fixed my own problem. There appears to be a BUG in DataVerse where it does not properly handle the OData.Id value of the Parent Site or Location (Document Location) and basically ignores it.  

    I was able to get the flow to complete without error by using the configuration shown below. 

     Screen-Shot-2021_2D00_04_2D00_25-at-3.46.53-AM.png

    However, this results in a Document Location record that has a BLANK Parent Site or Location (Document Location).

    The fix is to then create a traditional synchronous workflow in D365 that fires on create of Document Location Record when the value for  Parent Site or Location (Document Location) does not contain data as shown below. 

    Screen-Shot-2021_2D00_04_2D00_25-at-3.48.51-AM.png

    This is NOT the way this is supposed to work, so it appears there is some kind of Microsoft BUG with DataVerse Cloud Flows not properly interacting with the Parent Site or Location (Document Location) field. 

    However, the process detailed above successfully serves as a work-a-round. 

  • Nya Profile Picture
    29,060 on at

    Hi,

    Thank you so much for sharing your answers!

    Best Regards,

    Nya

  • Ran Zhang Profile Picture
    on at

    Thanks Jim for the sharing!

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
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 76

#3
Martin Dráb Profile Picture

Martin Dráb 66 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans