Greetings, Everyone.
I have a rather simple task that I am hoping to get some detailed guidance from someone who is willing to assist.
I would like to monitor the "Part.PartNum" field on the "Receipt Tracker" form (this field binds to “ReceiptRcvDtl.PartNum”) for any "OnChange" event. If an OnChange event exists, grab the part number value within that field and use it to call back to the Epicor DB to determine if there is a current, unresolved DMR Corrective Action on it.
I have proven that I can write the SQL to perform this lookup with a given part number. I don’t believe I should have too much trouble with that particular segment of my issue.
The problem for me is three-fold:
-
I do not know the most sensible approach to this — either [a] contain everything in a reusable DLL and call an “External Method” module in the BPM that uses the DLL, or [b] write all of the C# code into an “Execute Custom Code” BPM module, or [c] find a more effective way to perform this logic.
-
I do not know how to reference Epicor forms or form field objects in C#. I understand that I’ll need to inject an object reference library in order to pull up Epicor’s version of “App.Form.Field.Value”, but I’d have no idea which of Epicor’s several hundred DLL’s to reference in the project - let alone how the "Part.PartNum" field might be pulled from that.
-
I will need to isolate the value of the "Part.PartNum" field when the OnChange event kicks off. How do I reference that value? After I have it stored in a container, I’ll need to call the SQL DB to validate a boolean return on whether the condition I’m interested in is true or false. If true, I’ll need to present visual feedback to the end user that the part he, or she just entered is currently flagged with a DMR Corrective Action. Can I use “System.Windows.Forms” and work the feedback directly from the OS, or is there an Epicor library available that is specific to information message box elements that should be used instead?
Any firm, detailed code examples of how anyone might have approached similar tasks of this nature would, at least, give me some idea of how form elements and their values are referenced and used — and this would be most appreciated.
Thank you in advance. Enjoy your day.