Monday, February 2, 2009

OnChange vs. OnExitControl event in SalesLogix

Most of the user input controls have both OnChange and OnExitControl event. If no special reason, OnExitControl event should be handled instead of OnChange.

OnChange event will be fired every single time the user enters anything, but OnExitControl is fired only when user leaves that control, which means user finished data input. It makes more sense to handle the change event after the user is done, instead of in the middle. Especially in the case of date time entry, if users enter date manually instead of picking from the calendar control, the OnChange event will give you the every first number user inputs, which will break your date function.

No comments: