On the Production Order form, I am trying to update a user-defined field whose value I will retrieve from OITEM based on the product number entered (for both add mode & update mode).
I need to be able to capture the value that is loaded into the product number field right afer the users selects one from the Choose from list screen so that the new user-defined value displays on the form at the same time as the new product number does. I actually have accomplished that by setting a flag in the after event of the choosefromlist event and then on formactivate for the prod order form I retrieve & load the value. Great so far!
BUT! If the user keys in a new value, I also need to load the new user-defined field. I can do that too in a couple of ways, each of which leaves me with problems.
If I retrieve the user-typed-in value on lost focus for the product number field, that works unless they go hit the update/add button right away, in which case lost-focus for that field is not being triggered (at least consistently). For this problem, I have also tried to update the UDF or the datasource when the add/update button is pressed but that prevents the update since the system detects the field changes and the user must press add/update again!
If I do it on item validate, that works too unless the user is changing a value in update mode. When this happens the message about the product structure message appears twice, I think because now I am loading the UDF twice, once on form activate and once for item validate.
I am like a dog chasing it's tail! 😊 can anyone offer some guidance.
Thanks in advance