Make JSON call to get validation result.
Judy will pass to you:
Validation result will include:
- ERROR.LVL: 0 - No error, 1 - Warning Message, 2 - Invalid entry.
- RESET.FLDS: The names of the fields that need to be set to a given value.
- RESET.VALS: The value the field needs to be set to. Blank value means set it to the current default value.
- ERROR.MSG: The message to display to the customer.
The result can take 4 paths.
- All is well.
- Value completly invalid, Width of 9000 for example. Show message with OK button and send them back to the field to enter a valid answer.
- Value is valid, but it will invalidate other set values. Show message with Continue & Cancel buttons that tells the user what fields will be reset if they continue.
- The value is valid, but there is something the user should know. The best facility to ship from is Dallas, but we can only make the configuration in Sterling, we should tell the user about this. But it is not a critical error.
How to tell what path you are receiving from the RPC:
Path 1, ERROR.LVL = 0.
Path 2: ERROR.LVL = 2, ERROR.MSG <> ""
Path 3: ERROR.LVL = 2, RESET.FLDS = Field names to reset delimited by ^. RESET.VALS = Values to reset the associated fields to. "" means read the default value.
Path 4. ERROR.LBL = 1, ERROR.MSG <> ""