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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Business process flow fields are not hidden when form is saved

(0) ShareShare
ReportReport
Posted on by 190

I have a business process flow that has 4 stages all from the same table.  And i have 3 forms all showing the same BPF.  I am using javascript to hide them when the form is on load.  It works when the form is loaded and nothing is filled in yet.  but when i fill in some of the fields in the form and hit save, if I refresh the form or if I go back into the record, the field is visible again.  Here is the code :

if(formContext.getControl("header_process_da_vpstatus") != null)
{
formContext.getControl("header_process_da_vpstatus").setVisible(false);
}

I tried putting this on the form save event, but it still doesnt work.  

I have the same question (0)
  • bp3378 Profile Picture
    190 on at

    No i do not have any business rules regarding that field.  I just added formContext.data.addOnLoad(functionToRun) and now it runs and hides the field on form initial load and after saving.  However when I hit the refresh icon on the top of the form or if I navigate to a different form and go back, it does not trigger the function anymore and the field becomes unhidden.   Also if I go out of the form and into the table view, and click on the record, it does not trigger the function and therefore the field remains unhidden.  

    How can i trigger the function in these three scenarios?  I currently have the javascript added to the Form Onload event.

  • Community Member Profile Picture
    on at

    Hi bp3378,

    Do you have any activate business rule to show that field?

    If so, please deactivate that business rule to have a try.

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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
iampranjal Profile Picture

iampranjal 66

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 51 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 40 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans