$().SPServices.SPRedirectWithID - How to put the initial redirect in place

Aug 2, 2014 at 10:56 PM
Thanks for the great library, Marc! It's enabling me to build something my client thinks is pretty cool. So far, I'm using SPArrange Choices, SPCascadeDropDowns and SPLookupAddNew without a hitch.

I saw an invitation somewhere in the discussions to suggest other functions that might be of universal interest - which I'll take you up on in due course.

I'm now trying to implement SPRedirectWithID and am stuck on something that is probably obvious but, eludes me at the moment - probably because I'm returning to SharePoint after a good few years away from it!

My client is running SharePoint 2010 and I'm using IE 11(.0.9600.17207).

I'm using content types to create a staged workload funnel and would like be able to have the user redirected to the edit form, after creating a new list item: the standard case for SPRedirectWithID.

It's not working and I suspect that it's because there isn't a redirect in place already, as per your comment "there must be a redirect in place, as rdoyle78 points out in the comments below"

The address bar reads: https://{site address}/Lists/Ideas%20List/NewForm.aspx?Source=https%3A%2F%2F{site address}%2FLists%2FIdeas%2520List%2FAllItems%2Easpx&RootFolder=

(i.e. no ID reference)

My question is, how do I put the initial redirect in place?

Btw, I'd like to use SPRedirectWithID in three ways on the site:
  1. Staged entry of data into the Ideas List (so that customer department users don't freak out at the sight of too many fields when they come to suggest an idea - instead they enter a small subset of the required information, click save and are redirected to the edit form for the newly added item where they can add supplementary information optionally: standard case for SPRedirectWithID).
  2. Within department users click on Add new beneath an Idea List lookup in the Funnel list and are directed to a different custom New Item Form, which redirects them to a different custom Edit Form.
  3. Some users/user groups are redirected to the All Items list after adding a new item. Others are redirected to the edit form which had a bigger set of fields.
Thanks very much!

Aug 4, 2014 at 4:46 PM
Ok. There are two primary ways:
  1. Add the redirect to the Add New Item button.
  2. Add the redirect to the (new item) Save button.
SPServices takes care of it automagically if you're adding to a list from a Lookup (via SPLookupAddNew).

Here are some other links:
  1. http://techtrainingnotes.blogspot.co.nz/2009/06/sharepoint-redirecting-to-page-after.html
  2. http://adrianhenke.wordpress.com/2010/08/19/custom-redirect-after-creating-a-new-sharepoint-item/
Aug 10, 2014 at 2:26 AM

Did you get this working? In SharePoint 2010 the forms in dialogs are an issue. If you turn off the dialogs, the function ought to work with no other work required on your end.

Aug 19, 2014 at 10:05 AM
Hi Mark - sorry to be slow to reply: flat out. I got the basics working, then got stuck - chaining too many things, I suspect. Getting back into in the next day or so... I'll post what I come up with - hopefully not the need for more help - back here.

Thanks for checking in. 'Got quite a few other things going pretty easily.... thanks again for the toolkit!