SharePoint List redirect user after submitting form NewForm.aspx


Posted on : Fri, 16th Oct 15 11:49 am UTC
2314 votes

Scenario

Consider a SharePoint Out Of The Box list (or even custom list for that matter).

Users are always redirected to the default list view (AllItems.aspx) after clicking a button on the form (Save, Cancel, Close) -

  1. Create List Item (NewForm.aspx) - Clicking Save or Cancel button redirect to default list view.
  2. Edit List Item (EditForm.aspx) - Clicking Save or Cancel button redirect to default list view.
  3. Access List Item (DispForm.aspx) - Clicking Close button redirect to default list view.

How to redirect to a different page

What if you want to redirect the users to a different page, like Home page.
Append a query string parameter/attribute Source=[redirection link] to the URL, this will navigate the user to specified page.

This is how you do for redirecting to the Home page (/)

http://sharepointsite/Lists/SPList/NewForm.aspx?Source=/

http://sharepointsite/Lists/SPList/EditForm.aspx?id=1&Source=/

http://sharepointsite/Lists/SPList/DispForm.aspx?id=1&Source=/

Code2care's mission is to share varied knowledge in technical and non-technical areas gathered during day-to-day learnings and development activities so that our visitors can leverage this portal to find solutions to their queries without re-inventing the wheel. Technical posts include Learnings, Tutorials, Video Tutorials, Code Snippets, Tips-n-tricks.

Follow us : Facebook - Twitter - Google +