Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Business rule bug

  • 1.  Business rule bug

    TOP CONTRIBUTOR
    Posted 16 days ago
    Hi Anyone,

    Created Business rule to trigger on checkbox checked or unchecked condition. unchecked condition is always triggered on the page load event.
    Which i think is a bug. I have to write custom JavaScript to work around it.

    Anybody faced similar incident?

    Thanks

    Regards

    ------------------------------
    Jeebo Mathews
    Agricorp
    ------------------------------
    Academy - Online Interactive Learning from Experts


  • 2.  RE: Business rule bug

    TOP CONTRIBUTOR
    Posted 15 days ago
    To me, Business rules work off conditions rather than triggers.
    It can appear to be a trigger, because thing will change if the condition changes, but the condition is also valid when the form loads.
    You seem to have created an always load business rule, as all of the potential conditions are true.
    May try an option set, default is N/A and other values are Yes and No?

    ------------------------------
    Donal McCarthy
    Digital Marketing Administrator
    BrightWork
    Galway
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 3.  RE: Business rule bug

    TOP CONTRIBUTOR
    Posted 15 days ago
    Hi @Jeebo Mathews -

    I set one up in a demo environment to see if there is a bug, and it appears to be working as expected for me. Below I've pasted a picture of the business rule.

    When the user opens the form, it correctly executes the rule based on the status of the Request Approval checkbox. When the user changes the value of the checkbox it also correctly executes the rule.

    As @Donal McCarthy suggests - perhaps you are only responding to a specific field state and you need to add another condition for each possible state of the field?



    ------------------------------
    Geoff Ables
    Managing Partner
    C5 Insight
    Charlotte NC
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 4.  RE: Business rule bug

    GOLD CONTRIBUTOR
    Posted 8 days ago

    What may be the case here, is that you're checking on records on which the checkbox hasn't been checked/unchecked before. The value of that checkbox is NULL.

    So, if you're condition is like: checkbox does not equal No, the condition will evaluate to "true" when the checkbox is either Yes or NULL

    See below, this is a Pipeline checkbox on one of my forms. Looks like its value is No....

     But when you look at the actual field value (with the LevelUp tool):


    might be worth checking.

    cheers,


    ------------------------------
    Rogier Vriezen
    CRM Consultant
    Amsterdam, Netherlands
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 5.  RE: Business rule bug

    Posted 7 days ago
    We had a similar issue.

    The problem is that a checkbox is only two options: checked or not checked. There is no "not selected" option available. The default value is likely set up as not checked when loading the form. This is what is causing the issues.

    We actually ended up going with two check-boxes and made a requirement that one had to be checked before saving the form. (By default both checkboxes were set up as not checked).

    More explanation:
    We had a required field and needed to know if it was "certified" or "not certified".  By default it was "not certified" (not checked). However, it was easily bypassed because although it was required, it already had a value. We found this using a view/export.

    We ended up creating an additional field so we had two fields. One was called "certified" and the other "not certified". Both had a default of unchecked. Via JavaScript we stated that one (and only one) field had to be checked. If one field was checked the other field was unchecked via JavaScript (in case someone tried checking both).

    There may be other solutions but this was what we went as we felt it was easiest for our users.

    ------------------------------
    Holly Olson
    Magnetek, Inc.
    Menomonee Falls WI
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 6.  RE: Business rule bug

    GOLD CONTRIBUTOR
    Posted 6 days ago
    Edited by Travis Judd 6 days ago

    Hi Jeebo!

    I understand your pain and just wanted to add how I handle this.  I only use checkboxes when I'm setting them behind the scenes during uploads, javascript, flow, logic apps etc to set the form in a certain state. I avoid checkboxes when there needs to be a value entered and instead I have a global option set that has three options.

    Here is the solution I use for your problem - but you solution has it's advantages as well. 


    If the field is 'unassigned' it is recognized as 'null' and won't pass the required field business rules.  Unfortunately it is a dropdown so it's two clicks for the user.


    ------------------------------
    Travis Judd
    Business Apps Specialist
    Trek Bicycle Corporation
    WATERLOO WI
    ------------------------------

    Academy - Online Interactive Learning from Experts


If you've found this thread useful, dive deeper into User Group community content by role