Using Siebel Tools > Using Siebel Script Editors > Using the Siebel Script Editor >

Overview of Using Siebel Script Editor


The Siebel Script Editor is an editor that allows you to create and maintain scripts that use Siebel VB, Siebel eScript, or Browser Script. If you cannot use a declarative configuration to implement the functionality you require, then you can use the following editors to add a script to a Siebel object:

  • Server Script Editor. Allows you to create and modify Siebel eScript or Siebel VB.
  • Browser Script Editor. Allows you to create and modify Browser Script that runs in the Siebel client.

For more information, including a description of scriptable events and callable methods on browser objects, see Siebel Object Interfaces Reference, Siebel eScript Language Reference and Siebel VB Language Reference.

About the Siebel Script Editor

You can use the Siebel Script Editor to edit Siebel VB script or Siebel eScript script. It allows you to do the following:

  • Cut, copy, and paste the text from one location to another location in the Siebel Script Editor. You can also cut and paste text into the Siebel Script Editor.
  • Import or export a Siebel script.
  • Associate a given Siebel script with a predefined object event, such as a PreSetFieldValue event for a business component. For more information, see About Predefined Objects.
  • Debug custom script. For more information, see Using the Siebel Debugger.
  • Compile custom script. For more information, see Compiling Your Modifications.

The Siebel Script Editor uses a window that is similar to the Windows Notepad editor. It includes the following elements:

  • Title bar
  • Drop-down list that you can use to specify an object
  • Drop-down list that you can use to specify an event
  • Text entry window
  • Vertical and horizontal scroll bars that you can use to navigate.

Object Types You Can Script

You can use the Siebel Script Editor to add a script to the following object types:

  • Application
  • Applet
  • Business Component

An object definition for each of these object types includes a Scripted property. If this property includes a check mark, then this object includes a script.

Menus in the Siebel Script Editor

The following items are available from the File menu:

  • Import. Imports a Siebel script.
  • Export. Exports a Siebel script.
  • Save. Saves a Siebel script. Make sure you save your script before you exit the editor.
  • Exit. Closes the Siebel Script Editor window.

The following items are available from the Edit menu:

  • Cut. Deletes the selection and saves it to the clipboard.
  • Copy. Copies the selection to the clipboard.
  • Paste. Copies the contents of the clipboard to the chosen area.
  • Delete. Deletes the selection.
  • Select All. Selects the entire script.
  • Find. Displays the Find in Script dialog box. You can search for text or white space.
  • Replace. Displays the Replace in Script dialog box. You can search and replace text or white space.

Guidelines for Using Siebel Script Editor

If you use the Siebel script editor, then it is recommended that you use the following guidelines:

  • Check out or lock the project that the object definition that you modify references. If the project is not locked, then you cannot add text in the Editor window. For more information about projects, see Checking Out and Checking In Projects and Objects.
  • To verify the format of your Siebel VB or Siebel eScript script, click the Debug menu, and then click Check Syntax. The Siebel Compiler displays any format errors it finds and indicates the lines where these errors occur.
  • Save your work frequently and before you close the Siebel Script Editor. Click the File menu, and then click Save to save your work. If you close the Siebel Script Editor without saving your work, then Siebel Tools discards any modifications you make since the last save.
  • You must compile the projects that you modify before you run a Siebel application. For more information, see Compiling Your Modifications.
  • When pasting text into the Siebel Script Editor, avoid using two code blocks that use the same name. To do this, do the following depending on the type of script you use:
    • Siebel eScript. Place the code between function Name { and }. You must enclose all function code with curly braces.
    • Siebel VB. Place the code between Sub Name and End Sub.

Guidelines for Testing a Script

If you test a script, then it is recommended that you use the following guidelines:

  • To test a script, you can click the Debug menu, and then click Start. Siebel CRM runs with the new modifications incorporated. You can also click the Start button in the Debug toolbar.
  • To display an error when you test your script, you can start Siebel CRM in debug mode. To use debug mode, use the /H option on the start-up command line. If it encounters an error in your script, then it displays a dialog box that describes the error. To troubleshoot the error, you can open the Script Editor, click the Debug menu, and then click Check Syntax. For more information, see Validating Script Syntax.

    If a run-time error occurs in the Siebel client, or if Siebel CRM does not run in Debug mode, then it displays an error message that includes an error code. It returns control to the location in the predefined Siebel code just before the error occurred.

Using Siebel Tools Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.