cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mhmdbaba
Frequent Visitor

Cancel Button

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!

1 ACCEPTED SOLUTION

Accepted Solutions
DianaBirkelbach
Super User
Super User

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!

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

3 REPLIES 3
DianaBirkelbach
Super User
Super User

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?

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Mhmdbaba
Frequent Visitor

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

DianaBirkelbach
Super User
Super User

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!

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Users online (4,922)