How to set a default check box using Sage 500 Customizer module

1 minute read time.

If you need to set or change the default value of a check box, you can write a VBScript within Customizer's script editor to select or clear a check box. The construct of the script is the same for all check box default customizations: Form.Controls("[control name of checkbox]").Value = ('0' or '1') [control name of checkbox]: click on the appropriate check box in the form, and note the control name in the Customizer Name field. Value: '1' sets the default to selected; '0' sets the default to cleared.

Here is an example: to change the default Apply Credit Limit check box to selected on the Main tab in Maintain Customers, perform the following steps:

  1. Select the Maintain Customers task.
  2. Activate Customizer by pressing ALT+F3.
  3. Select the Apply Credit Limit check box on the Maintain Customers form.

Note: The name of the check box control, chkCreditLimitUsed, now displays in the Customizer Name field.

  1. Select the Script Editor button on the Customizer toolbar.
  2. Select the Control Name down arrow , then select Form.
  3. Select the Event down arrow, then select New
  4. Add the following code in between the Sub Form_New and End Sub statements:

Form.Controls("chkCreditLimitUsed").Value = 1

So when crating a new customer record this is how the 'Apply Credit Limit' box will default after enabling customization: