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
- Navigate to Product Administration.
- 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.
- Click the Configuration Designer tab.
- 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.
- Click New to create a new record.
A form appears for defining a declaration script record.
- 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.
- 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.
- Click the Root Product select button and select the current customizable product from the Pick Root Product dialog box.
- 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.
- 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.
- 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.
- 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.
- Click Save in the Scripts list to save the new script.
- Open the Script Designer menu and click Validate.
This starts a configuration session. Verify that the new script works correctly.