Source Parameter Still Alive in Modern Pages

SharePoint’s “modern” capabilities are changing the face of SharePoint – for the better. But it is taking us further away from some of the tricks and approaches that work with “classic” SharePoint. Thankfully one of the long-standing legacy features of SharePoint still seems to work – the Source parameter. 

When used as part of a URL in SharePoint the Source=[URL] parameter takes users to the specified page after a form is saved or cancelled. This allows us to manage some of the navigation flow for users.

So how does this work with “modern” lists and pages. On a list, you have the ‘New’ item button on the top bar.
image

When you click it the new item panel opens up. The top links on the panel include a ‘Copy link’ link.
image

image

‘Copy link’ for the New Item gives us the URL of the New Item form that can be used to link from other locations – such as an email footer, the left nav in a SharePoint site, etc. This link includes the Source parameter and by default will go to the default list view page for the list. Usually, that’s not where we’d like to see users end up.

If I’m building an intake solution, I might have a ‘My Requests’ page where I’d like users to end up. To make that happen it’s as easy as copying the link from the New Item page, getting the link to the My Requests page, and then swapping out the Source parameter value.

The default New Item link (with site-specific stuff stripped out):
https://[mydomain].sharepoint.com/sites/[sitename]/_layouts/15/listform.aspx?PageType=8&ListId=[listGUID]&RootFolder=&Source=[THIS IS WHAT YOU CHANGE]&ContentTypeId=[contentTypeId]

Target destination URL:
https://[mydomain].sharepoint.com/sites/[sitename]/SitePages/My%20IT%20Requests.aspx

The link you’ll use:
https://[mydomain].sharepoint.com/sites/[sitename]/_layouts/15/listform.aspx?PageType=8&ListId=[listGUID]&RootFolder=&Source=https://[mydomain].sharepoint.com/sites/[sitename]/SitePages/My%20IT%20Requests.aspx&ContentTypeId=[contentTypeId]

Using this approach you have a link you can use where users will be able to submit a new request, then end up on the My IT Requests page rather than the default list view page.

References

Leave a Reply

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

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