Announcements
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.
Code sample
ResetForm(SharePointForm1);Launch("https://webaddress")
Thanks in advance
JF
Hi @jfrancis
On the SharePoint integration node - OnCancel method
use
Launch("url");ResetForm(SharePointForm1)
Tested this out to make sure it works
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Reza
Thanks for the quick reply i tried what you suggested but it did not work. It looped me back to the all items page:
Launch("http://www.google.com");ResetForm(SharePointForm1)
It will launch google and then go to list screen (that is by design)
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.
TY
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!
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 358 Most Valuable Professional
11manish 214 Super User 2026 Season 2
Mohsin Ali 185