BPM not working in 10.2.500

I have an in-transaction data directive against the OrderHed table that was working in 10.2.400, but it’s throwing an error in 10.2.500. I’m trying to run a BAQ from a custom code block in the BPM, passing in the OrderNum as a parameter and returning an email address, and setting a custom field to that email address. It appears that the OrderNum is blank when the BPM is run, which causes an error.

Order Entry Code.txt (1.2 KB)

Have you tried doing a e-mail block on certain variables to see what their values are? Or do a Raise Exception with those variables showing in the message? If you are on-prem then you could do some WriteEntry for the event log and see where the issue may be.

Double check the default value on your set_APRemail_c field in UD columns. I have had similar errors where the value has no default in the UD column data, setting a default and regenerating your database and recycling IIS resolved the problem.

If you want to convert that code to Invoke-BO blocks for easier upgrades in the future:

Convert to a Epicor Function which is easier to manage.

1 Like

@gregbahr Please try passing OrderNumber as int instead of converting to string. Yesterday I had an issue with DocStar integration where PONum was passed as a string in integration which interfered with BPM in APInvoice which had a condition ttAPInvHed_Row.RefPONum != 0 condition.

Arul is correct. Parameters passed to DynamicQuery are expected to be string. (But still pass the proper ValueType)