If you need to add a default value to an existing control you can use Sage 500 Customizer. In this example using Customizer script the default credit limit in Maintain Vendors form is loaded by tabbing to the control containing the default value.
- Launch AP/Maintenance/Maintain Vendors
- Click on the ‘Customizer’ (Alt + F3) to open the ‘Customization’ screen
- Click on the ‘Credit Limit’ text field on Maintain Vendors form
- Press Ctrl+E or click on ‘Script Editor’ toolbar button on Customization which will invoke the script editor
-
Type the following VB script code in curCreditLimit_GotFocus event to set the default value of credit limit to $10,000 if the value is 0
Sub curCreditLimit_GotFocus
If Form.Controls("curCreditLimit").Amount = 0 then
Form.Controls("curCreditLimit").Amount = 10000
End If
End Sub
- Exit the ‘Script Editor’. Save the customization and exit the ‘Customization’ form
-
On the ‘Maintain Vendors’ form, create a new vendor ID, tab to the ‘Credit Limit’ and notice the value is set to the new default value