Email when Task is complete

We are wanting to start to update specific users when a task is completed. I am able to get a Post process Method directive to send an email to the user when the assigned person hits complete but the department that is requesting this email wants to pull case number and some other fields from HDCase but I am not sure how to add that table so I can pull information from there. Currently the design has a condition that looks at the task description to make sure it says “Production” and another check to see if complete=true. Any help would be appreciated on how to pull data from other tables. Thanks.

When I want to include related data in a BPM email, I usually get it one of two ways.

a.) Use custom code to link to the related table(s) and populate callContextBpmData field(s).

b.) Invoke BPM Method and to populated a tableset variable.

The related data field(s) are then be available for you to include in your email.

There are many examples for custom code and invoking methods.
e.g. Data Directive Custom Code - E10 Newbie!
E10 BPM - invoke a BO Method

Note I used to prefer custom code because it is simpler but…
More recently, I use invoke “widgets” as I’ve been told that custom code is more likely to “break” in a future upgrade vs. “widgets” that are less like to require rework.

More recently, I use invoke “widgets” as I’ve been told that custom code is more likely to “break” in a future upgrade vs. “widgets” that are less like to require rework.

I mean, yes, there’s more ways for a custom code block to break since you have the freedom to do things however you want. Personally, if it takes 4+ widgets to accomplish one step, I’ll probably reduce it down to one custom block. Widgets can still break, or you might have to revisit what a customization does in the future. Having everything in one place helps readability. Having said that, you should still treat a code block like a method and an entire BPM should be narrowly tailored. Single use principle still applies.

So after digging more into what’s available in the HDCase table I was able to get the majority of what I need for the email from there but now I am stuck on what method I should use to send the email when the case is closed. I have tried ERP.BO.Helpdesk.Update, OpenCloseCase, UpdateExt, and GetbyID. I am not sure what other methods to try to get the desired result but any help would be great. What I am hoping to have it do is when the case gets closed it will send out the email or when the production task gets completed.

The way I look at Widgets is that they are mini-code generators. When Epicor uplifts the version of .NET on the server (as they did for Kinetic 2022 to .NET 6), the code generators will generate valid .NET 6 code for you. If I write something in a code block, it won’t generate new code for that - I presume.

In my own opinion, I would prefer new widgets that reduce the amount of clutter (multiple assignments at a time for example) that makes the widget world more palatable to the code writers. Even though I consider myself more a coding person, I’m with @JasonMcD and use Widgets whenever possible.