"OnChange" Event on a Form Control

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:

  1. 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.

  2. 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.

  3. 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.

Hi Bill
Everything you want to do can be done within the epicor environment without the need to create custom DLLs etc. As a matter of fact it is generally recommended that you avoid writing custom DLLs since they hinder the upgrade process.

I recommend that you start by reading the ICE Customization Guide provided by Epicor on EpicWeb.
This will cover most of the techniques available within Epicor and it will give you a more rounded understanding of what you are trying to accomplish.

https://epicweb.epicor.com/doc/Docs/EpicorCustomization_UserGuide_101500.pdf

https://epicweb.epicor.com/doc/Docs/EpicorICETools_UserGuide_101500.pdf

I assume you were meaning Reciept Entry?

A Jose mentioned those manuals are a very very good starting point. I would look at BPM directives, and see if a Pre-Processing directive would work. You could use a designed query to receive the information you need about the part then show an exception or informational message depending if you want to prevent further processing until it is fixed or just inform the user of an issue and let the process continue.

I would also look at the tracing section as well as this will help you pinpoint the correct method that you will want to put the BPM on.

If a BPM does not do it for you, then a form customization might be the way to go.