BPM to compare NeedByDate to RequestDate

I am wondering what the complexity would be to compare the NeedByDate to the RequestDate in the Order Head and throw a warning if the NeedByDate is greater? Given the BPM designer, it seems like it should be essentially “No Code”, but I’m not sure if I need to implement some custom code to handle this.

I ran a trace and see a business object called Erp.Proxy.BO.SalesOrderImpl, but I do not see that available in the drop down when selecting the method in the method directive drop down.

If you do a pre-process on the Erp.BO.SalesOrder.Update it should work just fine. The complexity is low when compared to other method directives. You will have to a little “Low code” for the calculation to figure out the difference between the NB date and the R date.
This might help get you started:

1 Like

The “low code” would be just setting the right side of the expression to the ds.field that we would need to compare against?

In this case yes. The “code” would just be the request date field for the expression. no real code or math should be necessary.

I did not test the code in the screenshot so you might need to play around with the condition to get it working. Obviously building and testing in pilot is recommended.

Thanks Jacob, seems to work now. I’ll have to play around with it some more in test and see what issues I can find. I appreciate the help!

A few tests I would do. Test making a new order and changing the date before saving. Test by saving a good order, exit out of order entry, get back in order entry, and then change the date and save. Those should be good enough.

Glad I could help! good luck Cory!

1 Like