I want the user to be redirected to a different URL when they hit the cancel button in a sharepoint list custom form. I have been successful in the past with the onsave button using Launch() to redirect after submition, the same code does not seem to work on the oncancel button.
Thanks in advance
On the SharePoint integration node - OnCancel method
Tested this out to make sure it works
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thanks for the quick reply i tried what you suggested but it did not work. It looped me back to the all items page:
Thats not the behaviour i am seeing. Launch never opens a new tab in browser for web page. I just opens the allitems.aspx in the parent page. I never see the google page open at all and no pop-up warnings either.
The same code on here: SubmitForm(SharePointForm1);Launch("https://xxx.xxx.com/:u:/r/sites/xxx/forms/SitePages/Thank-You.aspx?csf=1&e=Hz13S3")
Works corectly takes me to correct page in a new tab but leaves the form open.
I am tring to avoid users going to the all items page all together. I want them to goto intranet page if they cancel.
This works for me
However it does show both allitems and the new browser
So no way to stop the user going to allitems even by doing the above (default behavior of cancel)
I think what you said is correct.
I have been fighting with this thing from many days, trying to get the user to redirect to a different URL or the home page of the site rather than the 'AllItems' page. I have tried using Navigate() and Launch with no luck. Let me know if you find a way to resolve this.
One thing that I did:
I changed the data that the AllItems view show to the user. Restricted it to only show the items that the user created (Use [Me] in the Edit view filters) so that we can restrict some infomation atleast. I wish there are other options for OnCancel. Thanks!
Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.
Fill out a quick form to claim your user group badge now!
Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities
Features releasing from October 2019 through March 2020
Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.
Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications