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 Apps
Answered

Cancel Button

(0) ShareShare
ReportReport
Posted on by 18

Hello,

 

I created a PCF dataset and then dropped it on a custom page. With a click of a button, this Custom page appears with the PCF in it.

I am willing to add a cancel button to close the custom page popup when clicked.

Should I add the button as a canvas button or implement it with the PCF using fluent UI?

I also want to close the popup after its submission.

 

I hope you would be able to provide me with some solutions.

thank you!

I have the same question (0)
  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    Hi @Mhmdbaba , 

     

    My take would be: make a canvas button on the CustomPage. There you can use PowerFx to close the dialog (use Back or Navigate for that).

    Do you need to interact with the Dataset PCF on the button?

  • MBaba Profile Picture
    18 on at

    hello @DianaBirkelbach ,

     

    Thank you for your help. I have also a custom button inside my PCF which, when clicked will take the selected rows and created a new record of them. This button when clicked is fine, but the Custom Page popup will not close. I also want to close the custom page popup using type script when button is clicked and records are created.

     

    Regards,

    MhmdBaba

  • Verified answer
    Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    Hi @Mhmdbaba , 

     

    Not sure if there is a way to do that.

    But when you set dataset.setSelectedRecordIds(ids) inside your PCF, you can read that from your Button in CustomPage. So you can create the record using the Canvas Button using PATCH (in PowerFx) and then close the dialog using Back() or Navigate(...)

    Hope this helps!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,074

#2
Valantis Profile Picture

Valantis 639

#3
11manish Profile Picture

11manish 606

Last 30 days Overall leaderboard