Skip to main content

Notifications

Community site session details

Community site session details

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

How to move the save button from the pcf control and use the model-driven-app form ribbon save button

(0) ShareShare
ReportReport
Posted on by 24

Hi,

 

I am writing to inquire about the possibility of integrating a save functionality within a PCF (PowerApps Component Framework) control.

 

Currently, I have successfully developed a PCF control that meets our requirements and operates smoothly. However, I am now faced with the need to streamline the user experience by removing the external save button and instead integrating the save functionality directly within the control itself.

 

My goal is to enable users to save data seamlessly from within the PCF control, thereby enhancing their workflow and overall experience. To achieve this, I have already implemented a save method within the PCF control, which is functioning effectively.

 

I believe that consolidating the save functionality within the PCF control will not only simplify the user interface but also improve efficiency and user satisfaction. However, I wanted to seek your advice and approval before proceeding further with this implementation.

 

Your guidance and feedback on this matter would be highly appreciated. Please let me know if you have any concerns or suggestions regarding this approach.

  • Verified answer
    Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at
    Re: How to move the save button from the pcf control and use the model-driven-app form ribbon save button

    Hi @sandzz  , 

     

    I think the best options would be to save each row (just-in-time) when the user leaves the row.

     

    Do you have a dataset PCF (I guess so, otherwise you could  make changes in PCF and the form saves by default)? So, with a dataset PCF, you could use the dataset save features, and save each row (just-in-time), instead forcing the user to click the save button). Here is the sdk: https://learn.microsoft.com/en-us/power-apps/developer/component-framework/reference/entityrecord/save?WT.mc_id=DX-MVP-5004107

    More details on saving with the dataset: https://dianabirkelbach.wordpress.com/2021/12/20/editable-dataset-pcf-new-sdk-methods/


    If that's not an option, you still need to use the form "save button":

    From inside a PCF you are not supposed to work with the form.

    But you could use output objects to send data to the form. Inside the form you could attach to OnOutputChanged  event (I have a blog with details on this): https://dianabirkelbach.wordpress.com/2023/05/19/let-your-subgrid-dataset-pcf-communicate-with-the-form/ . 
    Then you could use the onSave form event, and save the changed data. But it's not a good solution since:

    - you would need to reimplement the saving process on the form.

    - the form needs to be "dirty", otherwise the user will close the window, without being notified that the changes were not saved

     

    Of course, you could work with some unsupported approaches (like postMessage, to tell the PCF that the save was clicked), but it's not very clean, and you'll still have issues with making the form "believe" there were changes, otherwise you don't have even the "onSave" event on the form(if I remember well).

     

    Hope this helps.

  • sandzz Profile Picture
    24 on at
    Re: How to move the save button from the pcf control and use the model-driven-app form ribbon save button

    Hi,

     

    I want to use the save button on the form and not the save button that I added to the pcf control.

     

    sandzz_0-1712318782069.png

     

  • cchannon Profile Picture
    4,702 Super User 2025 Season 1 on at
    Re: How to move the save button from the pcf control and use the model-driven-app form ribbon save button

    So what are you looking for? Advice on how to hide the save button in the ribbon? As far as I know, the only way to do that is though Enable Rules in Ribbon XML. 

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