Question

I have an existing flow which includes multiple document approval steps. Depending on the outcome of each one, the document in question is moved to different folders within the same library.

I'm currently using the Link to item dynamic content piece in the "Item Link" section of the Start and Wait for Approval step.

The first approval step doesn't have a problem, since the document resides in the original folder, however, the document is moved after the first approval. Once the flow reaches the second approval step, the Link to item still points to the original location, thus resulting in a 404 when the approver clicks the link to the document.

I've thought about enabling the Document ID Service on the site collection (we're using Sharepoint Online; the site collection is part of a Hub), but I can't seem to find any information on whether Flow handles persistent/durable/permanent links, or if this is even the best way to go about it.

TLDR: How can I get a link to always point to the document in an approval flow, regardless of where the document lives at the time?

Was it helpful?

Solution

Got it working by activating the "Document ID" service.

Upon doing so, I had to wait for several hours in order for the Document ID Assigning service to run (it runs once/day, and can't be manually kicked off with SPO...just have to wait); this assigned Document IDs (containing durable links to all documents, regardless of where they are on the site collection) to existing documents. All new documents automatically receive a Doc ID upon creation.

Once the service was enabled, "Document ID" became available as dynamic content in my "Start and Wait for Approval" Flow step. I replaced all my "Link to Item" dynamic content with "Document ID" in the Flow.

After running a couple tests, I confirmed that the document ID link made docs available for review regardless of the folder or library location (given that they remain on the site collection; I believe for inter-site collection moves, the Document ID service needs to be activated on the other as well).

Hope this helps someone out!

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top