Method Directive Logic

I have a Post-Processing BPM on SalesOrder.GetNewOrderRel that is quite simple:

It checks to see if ttOrderRel.RowMod = “A” and if it does, it sets ttOrderRel.EntryDate_c to today’s date.

image

image

image

That works fine when in the UI. I threw a textbox into the Order Entry > Releases > Detail tab that is bound to OrderRel.EntryDate_c, and it populates when I create a new release.

Is there a way to get that to trigger for releases that are created via EDI? I have ran a few EDI Imports and that field does not seem to be populating.

I don’t think you need the condition check the GetNewOrderRel.

Action, set the added row. instead of changed row

EDI is probably not calling SalesOrder.GetNewOrderRel. You could run a client trace when you do the import, but it may be difficult to find exactly which methods are being called.

When I need logic to run no matter which methods get called, I use a Data Directive on the table. In this case I would create an In-Transaction data directive on OrderRel that checks if EntryDate_c is null (blank) and sets it to today’s date if it is. That way any OrderRel record that’s being saved will have the date filled in no matter where it comes from.

2 Likes

You can try using DemandImportEntry.ImportEDIPostProcessingDemand like from the post below. I do a lot of EDI cleanup there, but I would just move it to a DD on OrderRel that checks for an added row. It will only fire on a new release regardless of where it came from.

Data Directive was the way to go! Thank you!

image

image

EDIT: Changed the “the changed row” to “the added row”

2 Likes

I am trying to apply this same sort of BPM to the OrderDtl table, but it is throwing an error:

So I started from scratch on OrderDtl. The In-Transaction Data Directive on OrderDtl is this:
image

The conditional is:
image

The True/False Message Boxes are just that…they say either True or False.

How is the Conditional throwing a “Value cannot be null.” error?
image