6

I have a sharepoint list containing items. If I add a new item or edit an existing item in browser and click the “Save ” button I come back to the list again.

How can I be redirected to a specific sharepoint site/page (i.e. Home) after I clicked the “Save ” button.

Is there a workaround?

Thanks

5

You need to add a parameter in the URL :

http://mysite/myweb/mylist/NewForm.aspx?Source=http://google.com

You will then be redirected to Google.com.

  • But i can not tell thousands of users to put the "&Source=mysite.com" in the url every time if they add or edit the item. How can i automate so that if they click Save and are redirected to for example home.aspx Thanks. – user2524 Feb 26 '11 at 21:04
  • This won't work when going to a different site (e.g. not mysite) – Ryan Jun 24 '13 at 12:14
  • how to add the source parameter, in my SP Designer 2010's newform.aspx page? where will I add the source parameter? – userAZLogicApps Nov 8 '15 at 14:13
  • hi @sebastien levert, how to add a query string in your solution and pass this as a querystring and load the corresponding data in the editform.aspx. i mean, i wanna pass editform.aspx with ID=someid and in the ave button click , i would like to pass actual ID value, thats generated in the splist after presaveaction() called successfully. – userAZLogicApps Oct 18 '18 at 13:22
1

I use the SPServices to do this; more specifically the SPRedirectWithID function. I have used Content Editor Web Parts (CEWP) as well as customizing the NewForm.aspx in SharePoint Designer. (Thanks to Marc Andersen for this library! It has been a critical tool in my SP bag.)

0

If you're wanting to redirect users, you have a couple actions available to you.

If you are linking users to a new/edit form on the quick launch or some other place on the page, you or the content owners can create the redirect in the URL and users won't need to append it to the URL.

Create custom New/Edit forms in Sharepoint Designer. Replace the stock Sharepoint button controls with Input buttons and add your own redirect code.

The save/cancel buttons on lists and libraries is going to take to you the default view. If you don't want users to see that, you can create a view that displays nothing, or is automatically filtered by things they've created, or delete the list view web part entirely. You could then put some script on the page to redirect users automatically if Sharepoint Designer is not available for you.

-1

To redirect the save or cancel button, simply:

  • Open the list you want to modify the button in SP Designer
  • Click on the button you want to modify - ex, I am modifying the cancel button to take me back to the home page
  • In the tag properties, under the "redirectURL" property type your custom url - im my example, <SharePoint:GoBackButton runat="server" ControlMode="New" id="gobackbutton1" RedirectUrl="https://mywebsite/SitePages/specificPage.aspx"/>
  • To make this work, make sure your list item is opening in a new window - separate discussion topic!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy