web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Unanswered

Auto Save form after BPF action completes

(0) ShareShare
ReportReport
Posted on by 102

I have a BPF action that pulls back some variables (Process Arguments) that then set values against some form fields. This all works fine, but, it does not auto save the form so there are always "Unsaved changes" between transitions

Everything I have read points to putting and OnChange JS function call for that field in the form. The function works fine only if I manually change the values in the form or in the BPF field, but when the values are set via the action the JS function is not called and the form is still not saved.

Is there any way to get the form to save after a BPF action completes, or any other solution for the above issue?

Regards

Nick

I have the same question (0)
  • LeoAlt Profile Picture
    16,331 Moderator on at
    RE: Auto Save form after BPF action completes

    Hi partner,

    "Onchange" event of fields could only be triggered when change the value manually.

    1460.pastedimage1576825171331v1.png

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/events/attribute-onchange

    If you want to trigger the onchange function when the field value is changed by js code, you could use getAttribute().addOnchange(function(){}) method.

    function onchangeActiveStage(executionContext){
        var formContext = executionContext.getFormContext();
        var hassametaxrate=formContext.getAttribute("purchaseprocess");
        hassametaxrate.setValue(1);
        hassametaxrate.addOnChange(function () { changeBPF(formContext); });
    }


    changeBPF = function (formContext) {
        alert(1);
    }

    Hope it helps.

    Best Regards,

    Leo

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 100 Super User 2025 Season 2

#2
Suresh Kulla Profile Picture

Suresh Kulla 72 Super User 2025 Season 2

#3
DAnny3211 Profile Picture

DAnny3211 54

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans