BPM where field is boolean

Is there a known issue wherby a BPM set up to identify a true/false change on a form does not fire an e-mail

We’d have to see your set-up. Pre or Post, what BO/method?

Sounds to me like you may be toggling true/false on the client side but not server side.

It may take two directives. For example, I send out emails on Quote changes which is triggered by the “quoted” Boolean. I do a pre-processing to check my conditions and a post-processing to send the email on the changed row.

3 Likes

Hi David,
i’m undertaking a pre-processing on update.

I would try moving the Send Email to a post-directive.

So, in your pre-directive, include your condition, and if true, add an “Enable Post Directive”.

Then create a post-directive that has a condition of “This directive has been enabled from the XXX directive.” Where “XXX” is the name of your pre-processing directive.

Then hang your email on the true side of that condition.

Here’s my example, using Quotes. (I’m also doing a secondary condition on a another Checkbox which I toggle to TRUE at the end of this directive. If that checkbox is false, it’ll enable the post directive and then set that checkbox to true. That way, the next time this same quote runs through this directive, the checkbox will be TRUE and it won’t send the email again. I don’t want to get an email every time someone toggles the quoted checkbox. Just the first time.) So, for your purposes, you can ignore those extra widgets.

Here is my POST directive:

1 Like

Hi David,
I’m still struggling to get this to work. My Pre directive is

My post directive is

What’s not working? No email being sent?

You can try “changed row” instead of “updated row”. I’m not sure what you’re goal is. I believe “Changed” includes updated and new… where updated is only updated. I think… maybe?

I’m assuming your email settings are set up and working in other areas of the system.

Thanks David., I will change this and give it another go. I’m trying to send an e-mail if the deferred revenue tick box changes on the AR Invoice Header

I just wasn’t sure about “new” records and how you were testing. If you create a NEW header, and check the box, it may not kick off the email if your Pre method is using “updated”.

Understood.

Test that the conditions are firing properly with an Info Message widget first instead of the email sending…

If the conditions are working then it could be an issue with email setup in your environment.

2 Likes

Hi Tom,
Tested with another directive and the e-mail side is working ok

Hi Martyn,

I don’t know if this will fix your issue with the email not being sent, but the condition you’re using in your Condition Widget is not the correct one for the condition described above. You currently have “The DeferredRevenue Field of the Update Row is equal to true”. This would fire the email every time the InvcHead record is updated, regardless of what field is updated, as long as that field is true. There is a different condition option “The <Specified Field> has been changed from <Value> to <Value>” or in your case, “The Deferred Revenue Field has been changed from false to true”

Question for you on the emailing though: How are you testing this? No BPM will ever fire when a checkbox is marked true, but only after it’s marked true and saved.

1 Like

Thanks Kevin
I have tested your suggestion but still no luck.
I am testing by unticking a deferred revenue AR Invoice saving then tick and saving

I just did a test in my PILOT and watched the events in Debugger… these are the calls I’m seeing when I save an Invoice Header:

image

Wondering if you need to try this method on the “UpdateMasterUsingPasteInsertRowMod” instead of just “Update”??

1 Like

Now that you show that, I’m remembering when I was trying to do a BPM on AR Invoice earlier this year, and couldn’t get it to fire as needed. I switched to a data directive.

1 Like

Hi David,
Tried this but still the same

1 Like

I would switch over to a data directive as @kve mentioned and see if that works.

Thanks David,
I do not have a lot of experience as you may tell. I created a data directive as below but getting an error probably around the rule or maybe something else.