Calling a method or running a BPM on click event

Hey all,

I am attempting to design an epibutton that will send an email for an advanced ship notice when clicked.

I have successfully created the BPM to send the advanced notice when a method is called and the c# to recognize the button click.

I would like to either directly run that BPM when the button is clicked or force the button to call a method that will trigger the BPM to run. Can anybody assist me with the code needed to do this? If there is an alternative, better way to achieve this objective please don’t hesitate to make a recommendation!

Thank you for your time.

One thing I am particularly struggling with is referencing Epicor assemblies. I have downloaded an object reference for this, but am still learning c#. I commonly receive Error: CS0234 “The type XYZ does not exist in the current context”

To get a BPM to fire, you have to change something. A way to do that is to to create a UD field that is just a check box in order to get something to change. I do that to send off an e-mail to make a task in our productivity software from Job entry. No code needed. edit (mine is on a data directive, realized that after I looked)


The easiest way to do this is to do it with a “real” data change…

  1. create a UD Field in the associated table. This can be a checkbox…
  2. make your BPM so that in a Method bpm (ie… Sales.Update), if the checkbox changed from False to true, send your email… THEN turn off the checkbox before saving.

@banderson beat me to the answer. hahaha

1 Like

Thank you for the response, this is an excellent suggestion

Good practical answers already, but one other point -

Your method within the customization needs to effectively save what the user is working on. Quite often that’s as simple as oTrans.Update(), but be aware that many other things may happen as a result.

1 Like

Appreciate your time, Tim. I’ve asked a couple of questions on here and you’ve always provided excellent quality feedback. Thanks again.