Pre Processing Condition "Field has been changed" not firing when calling method from external API

Good Morning Everyone,

I’m running into an interesting issue with the pre-processing “Field has been changed” condition when calling this method externally, say SalesOrder.MasterUpdate().

Lets say for example I want to set a simple field or send an email, In the UI I mark the checkbox as true, and boom the condition is met. If I do a getByID() , modify the dataset (change said boolean to true), mark the row as “dirty” “U”, and call masterUpdate, the condition does not fire. It will only fire on a post if I say “All unchanged rows == true”.

How can we make Epicor aware a field “has been changed” in pre-processing, externally?

I think you need to make a copy of the row and pass one as unchanged, and then modify the second version and mark it as updated. That’s my first guess, going off of a few posts recently about how Epicor expects the data.

Edit to add: here’s a link to a comment talking about this: BPM Email Alert - Fields Show Twice - #10 by jgiese.wci

2 Likes

Ah yes, I remember seeing something about that. Thanks for pointing me in the right direction!

Just a little update,while I was messing about I realized the condition “Method changed the specified field in the specified query from X to Y” in a post process works externally as well! I just specified the TT table I was changing for the query part. This is in place of enabling a post directive from a pre processing where field has been changed condition. Works great! At least in the context of the Sales order BO.

Note* our API is using REST to call a patch to the order in this example

1 Like