Skip to main content

Notifications

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.  

  • bp3378 Profile Picture
    bp3378 190 on at
    RE: Business process flow fields are not hidden when form is saved

    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
    Community Member Microsoft Employee on at
    RE: Business process flow fields are not hidden when form is saved

    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

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,817 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans