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.
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.
Hi,
I want to use the save button on the form and not the save button that I added to the pcf control.
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.
WarrenBelz
85
Most Valuable Professional
Michael E. Gernaey
57
Super User 2025 Season 1
mmbr1606
55
Super User 2025 Season 1