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:
- Add a hidden field.
- Prepopulate a hidden field before saving with a specific value.
- Use Redirection.
- 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!
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; });