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:
- Select the Maintain Customers task.
- Activate Customizer by pressing ALT+F3.
- 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.
- Select the Script Editor button on the Customizer toolbar.
- Select the Control Name down arrow , then select Form.
- Select the Event down arrow, then select New
- 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: