If I want to ensure that a CustomerID field is entered only once in SalesLogix, how is this best handled? I’ve tried the OnExitControl event but that doesn’t seem to work right.
Have you tried the “OnValidate” event of the Form?
Not sure how much 7.5.2 has changed from 7.5.1, but if you look at the Account Detail form, it may already have a handler for the OnValidate event of the Form. It is on this Event where you could check the value of the field and prevent the user from going away from this record (or from Saving) by returning “False”
If Not MyCustomValidationFunction() Then
‘Issue Error Message (could be done inside the validation function)
‘Set Focus to Field (could be done inside the validation function)
AXFormValidate = False