Redirect to formset on save

Hi, how do you redirect to a specific form set on save ?

Hi!

I’m sorry for a late reply.

Please consider the following solution:

  1. Add a hidden field.
  2. Prepopulate a hidden field before saving with a specific value.
  3. Use Redirection.
  4. Use Custom Routing checking item’s hidden field equal to a specific value.

Hi Alex, I did the exact solution already and it worked.

Thanks for the response.

Hi Alex

Is there a way to redirect after save also in form panel without opening a new page/tab (e.g. open the display form panel after edit)?

Thank you!

@AlexZver Any mews on this? :slight_smile:

Hello @phil!

Sorry for the delayed response.

Please use the following code to redirect a user to the display form after save.

Please see this article for more information.

    fd.spSaved(function(result) {
var listId = fd.spFormCtx.ListAttributes.Id
var itemId = result.Id;

//replace "https://domain.sharepoint.com/sites/sitename/subsite" with path to your site
//PageType=4 means Display Form
result.RedirectUrl =
    "https://domain.sharepoint.com/sites/sitename/subsite/_layouts/15/listform.aspx?PageType=4&ListId="
    + listId + "&ID=" + itemId;   });

Hi @mnikitina

Thank you. Is there also a way to redirect to a form panel (SharePoint Modern lists)?

@phil

No, i’m afraid not.

The redirection works only to the full-screen views.