Product Administration Guide > Customizable Product Scripts >

Creating a Declarations Script

Declaration scripts are methods that you want to make available to event scripts or other declaration scripts. Declaration scripts are stored in a common area accessible by event scripts. Declaration scripts can call methods and objects defined in the Siebel API.

Use declaration scripts to write methods that are common to more than one event script. Instead of repeating the method in each event script, you can write one declaration script and call it from within the event scripts that use it.

To create a declarations script

  1. Navigate to Product Administration.
  2. Select and lock the desired customizable product.

    If you omit this step, the most recently released version of the customizable product is loaded in the Script Designer, and you cannot create or edit scripts.

  3. Click the Configuration Designer tab.
  4. From the Configuration Designer menu, choose Script Designer.

    The Script Designer, Scripts list appears. It displays the scripts that have been created for this customizable product.

  5. Click New to create a new record.

    A form appears for defining a declaration script record.

  6. In the Name field, click the down-arrow and choose "(declarations)."

    If this is not the first declarations script, overwrite "(declarations)" with a script name. All scripts for a customizable product must have a unique script name.

  7. If this is the first script you are creating for this product, click the down-arrow in the Program Language field and select Visual Basic or eScript.

    If this is not the first script, click the down-arrow and select the programming language used for previous scripts.

  8. Click the Root Product select button and select the current customizable product from the Pick Root Product dialog box.
  9. In the Script Designer, click Save.

    The form is replaced by a list of the scripts that have been created for this customizable product. The record you just created is highlighted.

  10. In the Script Definition form, enter the script.

    The Script Definition form is located below the list of scripts. If you want to delete your entries and start the script over, click Reset.

  11. When you have finished entering the script, click Check Syntax.

    If there are errors, they will display at the top of the Customizable Product Scripts form. Correct any errors before saving the script.

  12. In the Script Definition form, click Save.

    The new script displays in the Customizable Product Scripts form when you select the script name in the Script Designer.

  13. Click Save in the Scripts list to save the new script.
  14. Open the Script Designer menu and click Validate.

    This starts a configuration session. Verify that the new script works correctly.

Product Administration Guide