Redirect ‘Link to item’ URL from-out Microsoft Flow to EditForm instead of DisplayForm

Within Flow, you can use the ‘Link to item’ Dynamic Content attribute to add a link your item (eg. in an email). This link always points to the DisplayForm of your item. In some cases, it might come in handy to point to the EditForm instead. In this blog, I will explain you how to do this.

Link to item

To show you what the default Link to item attribute does, I added a simple list in SharePoint and created a new Flow that runs for a selected item. No further actions are required for now. When I run this Flow on an item in that list, I can see the itemURL property (which is the same as the Link to item Dynamic Content attribute) inside the OUTPUTS of the For a selected item trigger:

  "ID": "1",
  "itemURL": "",
  "fileName": "Just an item",
  "fileId": "1"

When I write this URL back into my SharePoint item and open the link, I will get redirected to the DisplayForm of that item:

Redirect to the EditForm

As you can see in the itemURL above, there is no clear URL parameter that tells me it will point me to the DisplayForm. I was triggered by the ‘PageType=4‘ parameter and started playing around with it. Quickly, I discovered that the parameter for redirecting to the EditForm instead of the DisplayForm was ‘PageType=6‘.

You can easily perform this action in Flow by using the replace() expression:


What happens with this expression is that we use a string: body(‘get_item’)?[‘{Link}’] (which is the Link to item Dynamic Content attribute) to replace a specific value: ‘PageType=4’ (which is the DisplayForm parameter) with another value: ‘PageType=6’ (which is the DisplayForm parameter).

After putting this in our Update item action, we can see that this new URL will redirect us to the EditForm:

This also works when you modified your forms using PowerApps!

2 Replies to “Redirect ‘Link to item’ URL from-out Microsoft Flow to EditForm instead of DisplayForm”

  1. Thank you so much! If we expect users to input information, it’s more user friendly to direct them to edit mode.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

This site uses Akismet to reduce spam. Learn how your comment data is processed.