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

Announcements

No record found.

News and Announcements icon
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

  • LeoAlt Profile Picture
    16,341 Moderator on at

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
11manish Profile Picture

11manish 44 Super User 2026 Season 2

#2
Travis South Profile Picture

Travis South 41

#3
Ayesha Wajahat Profile Picture

Ayesha Wajahat 18

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans