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 :
Power Platform Community / Forums / Power Apps / Business rule fires on...
Power Apps
Answered

Business rule fires on server-side, but intermittently on the front end

(1) ShareShare
ReportReport
Posted on by 401

A model-driven app using business rules has been working well in production for 2+ years. However, as of yesterday, the client-side (front-end) only works intermittently. I have replicated the issue in a simplified app, in a test environment, in order to isolate the problem.

 

Example: 

1. I open the app (as sysadmin), and press CTRL+F5.

2. I open the entity view, and click on the New button.

3. Rule works well (fields shown are conditional based on the "Create Ticket By" field).

CharlesS_0-1718716012617.png

4. If I change the Create Ticket by field, the fields shown change accordingly 

CharlesS_1-1718716056817.png

5. I save the record, and click New to create another record.

6. The business rule is no longer applied (all fields shown)

CharlesS_2-1718716124014.png

7. If I change the Create Ticket BY (which should show some fields, and hide others), nothing changes

CharlesS_3-1718716175679.png

 

Relaunching the app and refreshing the browser many times helps to make the business rules work once more... but it quickly stops working again as soon as a new record is once again created. 

 

How can the erratic business rule behaviour be explained?

I have the same question (0)
  • MichaelFP Profile Picture
    1,847 Super User 2025 Season 2 on at

    @CharlesS  On the developer tool bar did you notice any error? 

  • Charles Seguin Profile Picture
    401 on at

    Which Developer Tool bar are you speaking of? F12 in the browser? 

  • MichaelFP Profile Picture
    1,847 Super User 2025 Season 2 on at

    Yes devloper tool bar from the browser.

  • Charles Seguin Profile Picture
    401 on at

    @Michaelfp Our team was unable to find any relevant errors in the console 😞

  • Verified answer
    MarioRing Profile Picture
    541 Super User 2024 Season 1 on at

    Here are some of my suggestions that I would use if I were you:

    Examine all JavaScripts on the form, and all business rules. Deactivate them one by one and explore the combinations. Perhaps different elements of the system affect the same element of the form, and the effect on the screen depends on which code happened to execute faster (therefore there is randomness).

    Create the same business rule again.

    Modify the "scope" parameter in Business Rule, then see how the system behaves after the change.

    Create a new form for the same entity from scratch and check if the problem persists.

    Check in another browser and in incognito mode. Clear cookies.

    Worst case scenario - rewrite the business rule functionality as JavaScript.

  • Charles Seguin Profile Picture
    401 on at

    @MarioRing Those are really good suggestions and I would advise anybody with similar issues to try all those things before trying the unlikely fix I describe below.

     

    1. We created a Javascript Web Resource with the following (seemingly useless) code:

     

    function run(executionContext) {

        var formContext = executionContext.getFormContext().data.entity;   

        console.log("This JavaScript was deployed to correct a bug with the triggering of business rules. Triggering this JavaScript OnLoad effectively forces the business rules to trigger. Ref Microsoft Support Ticket: TrackingID#xyz")

    }

     

    2. We set an OnLoad event for this script in the relevant forms.

    3. Somehow, running this script OnLoad seems to force all relevant business rules to trigger consistently.

     

    We discovered this fix while developing the last resort solution suggested by MarioRing. We rewrote one of our business rules in JS and tested it, first with all other business rules off (it worked!). Then, we tested it with all other business rules on... not only did it work, but the other business rules started firing too! 

     

    We removed our newly created JS OnLoad event, and reactivated the original business rule the JS was meant to replace. Finally, we set tried the bizarre solution described above.

     

    Because we cannot explain why this unlikely fix works, we do not consider this to be a permanent fix. Nevertheless, it should allow our users to operate normally for now.

     

    We hope this information can be of assistance in the community's troubleshooting efforts.

  • scaldwell Profile Picture
    6 on at

    We have had similar issues with Business Rules not firing on forms, specifically when creating 'New' records.  These issues started about a week ago across our Dev/UAT/Prod environments.  Like yourself, these are mature forms that have been in production for years.  The problem seems like to have been introduced in a recent update.  We currently have a ticket in with MS, hoping for a resolution soon.

  • Charles Seguin Profile Picture
    401 on at

    I am pleased to report that, pursuant to the support tickets opened by several customers, Microsoft pushed a backend fix to resolve this issue. As such, you should no longer be experiencing the issue described herein.

     

    If you do experience similar problems, I encourage you to try the troubleshooting steps described by @MarioRing above.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard