web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / SharePoint Integration...
Power Apps
Unanswered

SharePoint Integration - OnCancel I want to user to open a different URL

(0) ShareShare
ReportReport
Posted on by 4

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

Categories:
I have the same question (0)
  • RezaDorrani Profile Picture
    12,145 on at

    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

     

     

  • jfrancis Profile Picture
    4 on at

    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)

     

    JF 

  • RezaDorrani Profile Picture
    12,145 on at

    Hi @jfrancis 

     

    It will launch google and then go to list screen (that is by design)

  • jfrancis Profile Picture
    4 on at

    Reza

     

    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

  • RezaDorrani Profile Picture
    12,145 on at

    Hi @jfrancis 

     

    Capture.PNG

     

    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)

     

     

  • BB9 Profile Picture
    78 on at

    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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 136 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard