Field Leave or Send Tab

customization

(Chris Conn) #21

Jose.Notify(“You da best”);


(Brandon Anderson) #22

image


(Richard Riley) #23

Hey Calvin - in response to “Why did the following work”.

You have to consider what you are doing and how that causes the Epicor UI to behave.

You are setting the value of a text box which by itself does nothing - it may display that new value but the Epi Magic is not aware of the change.
You then set focus to the text box - Epi Magic warming up.
You then set focus to another control - Epi Magic kicks in full.

As you attempt to leave a control, the Epi Magic steps in and compares the Value of the control with the Value of the data for that field in the Data View. If different, the EpiDataView is updated. Once the Data View is updated, any Field Changing / Field Change logic is invoked.

If there was a Field Changing event and the data change had been rejected, focus should remain on the Text Box.


(Calvin Krusen) #24

I understood the mechanisms. My question was really more along the lines of why that worked, when the desired method is to use the dataview.

Is the method that doesn’t use the dataview valid? Or just a a hack that happens to work for this particular case?


(Jose C Gomez) #25

There are many ways to skin a cat. What that did was basically mimic the user clicking on the control typing something in and leaving the control. Which then because of all the events wired up to that control make Epicor do what it is intended to do.
However you are going all the way North around the world to end up 2 miles south of where you currently are…


(Calvin Krusen) #26

Is there any difference in the end result?

I assume using the database, the UI doesnt update until after the .notify() call. Are the DB tables updated too? Or will the form still need to be saved?

I assume the “update control, then change focus” method would only update the other UI controls (via the builtin E10 functionality), but still require the form to be saved.