Method Directive - can we write functions?

I’m probably overthinking this, but I’m extending a method directive used to read serial numbers from external manufacturing processes(we don’t use full serial tracking)… My OOP background tells me I should follow SOLID principles, but I’m not sure that’s an option as I don’t know that I can write functions to follow the single responsibility principle. More concretely I need to parse the current job #, check if serial numbers exist for the current job, and then write them to a temp table. Normally I would write at least three functions for this. Is it possible to write functions in a method directive?

For now I’ll just get a proof of concept working, but would love to hear any suggestions?

You actually can do functions but what you are trying to do seems overkill to do 3 functions for

You would have to write Epicor functions and invoke them on the BpM

1 Like

Another option might be to use a Func delegate to create local functions

Not sure if Epicor uses c# 7 or greater but if it does local functions is also an option.

1 Like