Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Create a document location record using Flow/DataVerse

(0) ShareShare
ReportReport
Posted on by 1,579

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? 

  • Ran Zhang Profile Picture
    Ran Zhang on at
    RE: Create a document location record using Flow/DataVerse

    Thanks Jim for the sharing!

  • Nya Profile Picture
    Nya 29,058 on at
    RE: Create a document location record using Flow/DataVerse

    Hi,

    Thank you so much for sharing your answers!

    Best Regards,

    Nya

  • Verified answer
    ACECORP Profile Picture
    ACECORP 1,579 on at
    RE: Create a document location record using Flow/DataVerse

    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. 

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,820 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,514 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans