Sie sind auf Seite 1von 23

Siebel Scripting, Part One

Scripting Concepts: Basics

 Types of scripts in Siebel
 Scripting Languages
 Siebel objects that use scripting
 Various uses for scripts in Siebel
 Browser Scripting
Types of Scripts
 Server Scripts
 Run on the Siebel server
 Not transferred to user’s machine
 Siebel VB or eScript
 Browser Scripts
 Run on user’s PC in browser window
 Always JavaScript only
Scripting Languages
 Siebel VB
 eScript
 JavaScript
Siebel VB
 Based on VBScript from Microsoft
 Has special Siebel extensions
 Includes many Siebel defined objects
 e.g.. BusComp, PropertySet
 Based on BASIC syntax
 Based on JavaScript
 Has special Siebel extensions
 Includes many Siebel defined objects
 E.G.. BusComp, PropertySet
 Based on C syntax
 Used in browser scripts only
 Only scripting language used in
browser scripts
 Based on C syntax
 Can use many of the Siebel objects
previously mentioned
Siebel Objects That Use
 Applets
 Business Components
 Applications (Call Center, Fins, etc)
 Business Services
 Views, Screens, Tables, and Other
Objects Cannot use Scripts
Scripting In Applets
 Server Scripts
 Browser Scripts
 Events
 E.g.. WebApplet_Load,
Scripting In Business
 Server Scripts
 Browser Scripts
 Events
 E.g.. BusComp_SetFieldValue,
Scripting In Applications
 Server Scripts
 Browser Scripts
 Events
 E.g.. Application_Start
 Objects and functions on application
object can be accessed from
elsewhere in the system (escript
only). E.g.. From an Applet or
Scripting In Business
 Server Scripts
 Browser Scripts
 Events
 BS are objects designed for one
purpose: holding scripts
 Good place to put code you wish to
access from various places
 Many pre-defined BS in system, mostly
for EAI
How Scripts Are Used
 Applet Buttons
 Sharing data between objects
 Enterprise Application Integration
 As an alternative to configuration
 Almost anything that can be done with
configuration can be done with scripting
Applet Buttons
 You can create your own buttons on
 Need script to make them clickable
(not grayed out)
 Need script to do some action when
they are clicked
Sharing Data Between
 SetSharedGlobal
 GetSharedGlobal
 SetProfileAttr
 GetProfileAttr
 Use to store data from one object,
can be accessed from any object
Enterprise Application
Integration (EAI)
 Virtual business components (VBC)
 Parsing and creation of XML files
 Many built-in business services
 Learning EAI is mostly understanding
how to use these services
Scripting As An Alternative To
 More flexible than configuration
 Just because you CAN replicate
configuration behavior in script
doesn’t necessarily mean that you
 Scripting something that can be done
with configuration should never be the
first choice: only if there is a specific

Browser Scripting
 Browser Scripts are actually run on the
client machine- including when using
Web Client or Wireless Web Client
 So, they must be included with the
HTML files and pushed to the client
 This makes them Physical UI files
 And Requires an extra step:
Generating Browser Scripts
 Compiling the repository does not
create the necessary UI files for
browser scripts to work.
 Those files need to be in
 For Dev Clients in C:\Program
Files\Siebel\7.8\web client\PUBLIC\enu
 Use genbscript.exe to generate them
genbscript Syntax
 genbscript [cfgfile] [destdirectory]
 Example:
 genbscript
Alternative Way
 In Siebel Tools, select View ->
 Click Scripting Tab
 Enter Destination Directory into
Browser Script Compilation Folder
 Each time you compile, browser
scripts will be automatically
 You must still move them to the
Why Browser Scripting?
 If Browser scripts require so much
more work (not to mention are
slower), why use them?
 Some things can only be done (or
only be done well) via browser script
 Popup window to client
 SetRecord Event