Skip to main content
Community site session details

Community site session details

Session Id : F6oLHqMoEwoeYmCtkrb8KC
Power Apps - Power Apps Pro Dev & ISV
Answered

Cancel Button

Like (0) ShareShare
ReportReport
Posted on 7 Sep 2022 10:17:07 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 08 Sep 2022 at 05:42:37
    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 08 Sep 2022 at 05:11:56
    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 07 Sep 2022 at 11:03:51
    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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Loading complete