Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
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!

  • Verified answer
    Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at
    Re: Cancel Button

    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!

  • MBaba Profile Picture
    18 on at
    Re: Cancel Button

    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

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at
    Re: Cancel Button

    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?

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 57 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 55 Super User 2025 Season 1

Overall leaderboard