How to add a default value to an Existing Control using Customizer

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.

  1. Launch AP/Maintenance/Maintain Vendors
  2. Click on the ‘Customizer’ (Alt + F3) to open the ‘Customization’ screen
  3. Click on the ‘Credit Limit’ text field on Maintain Vendors form
  4. Press Ctrl+E or click on ‘Script Editor’ toolbar button on Customization which will invoke the script editor
  5. 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



  6. Exit the ‘Script Editor’. Save the customization and exit the ‘Customization’ form
  7. 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


Anonymous