Siebel eScript


Published on

The slides for introducing how to use Siebel eScript and some best practies

Published in: Technology
1 Comment
  • For Siebel CRM Online Training Register at
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Declarative alternative strong typing Support strong type and typeless variable Strong type –- compile time  performance Typeless -- runtime
  • ECMA-262 Edition 4 You should regard coding as a last resort. Siebel Tools provides many ways to configure your Siebel application without coding, and these methods should be exhausted before you attempt to write your own code, for the following reasons: ■ Using Siebel Tools is easier than writing code. ■ More important, your code may not survive an upgrade. Customizations created directly in Siebel Tools are upgraded automatically when you upgrade your Siebel application, but code is not touched, and it may need to be reviewed following an upgrade. ■ Finally, declarative configuration through Siebel Tools results in better performance than implementing the same functionality through code.
  • Siebel eScript

    1. 1. Siebel eScript
    2. 2. Agenda <ul><li>What’s Siebel E-Script </li></ul><ul><li>Why to use </li></ul><ul><li>Where to use </li></ul><ul><li>When to use </li></ul><ul><li>How to use </li></ul><ul><li>Tips and Tricks </li></ul>
    3. 3. What’s Siebel E-Script <ul><li>A scripting language </li></ul><ul><li>The core language is javascript </li></ul><ul><li>Siebel eScript provides access to local system calls through two objects, Clib and SElib, </li></ul>
    4. 4. Siebel Script --outlying <ul><li>Types of Scripts: There are two types of scripting available: </li></ul><ul><ul><li>Server Scripts (eScript or SiebelVB) </li></ul></ul><ul><ul><ul><li>Execute on the server for web clients or on the client machine for mobile or dedicated web clients </li></ul></ul></ul><ul><ul><li>Browser Scripts (JavaScript) </li></ul></ul><ul><ul><ul><li>Downloaded to the client and are executed within the browser </li></ul></ul></ul>
    5. 7. Where to Use <ul><li>Siebel Tools </li></ul><ul><li>Web </li></ul>
    6. 8. When to use <ul><ul><li>Data Validation: Complex and business object/component data relationship rules can be written </li></ul></ul><ul><ul><li>User Interaction: Specific messages to users based on specific inputs – string concatenation is supported </li></ul></ul><ul><ul><li>Integration: Transfer the data to and from the external system ,uses include calling a business service, workflow, etc </li></ul></ul>
    7. 9. When to use
    8. 10. How to Use <ul><li>Siebel eScript Guidelines </li></ul><ul><li>Siebel eScript Commands </li></ul>
    9. 11. Siebel eScript Guidelines <ul><li>Declare your variables </li></ul><ul><li>Consider case sensitivity </li></ul><ul><li>Use parentheses () with functions </li></ul><ul><li>Use four-digit years in dates </li></ul><ul><li>Use the this object reference </li></ul><ul><li>… </li></ul>
    10. 12. Siebel eScript Commands <ul><li>Applet Object Methods </li></ul><ul><li>Application Object Methods </li></ul><ul><li>Business Component Objects </li></ul><ul><li>… </li></ul>
    11. 13. Tips and Tricks <ul><li>Scripts are always interpreted (all text in the script is parsed), use compact notation where possible (for example): </li></ul><ul><ul><ul><li>if(foo == bar) </li></ul></ul></ul><ul><ul><ul><li>doSomething(); </li></ul></ul></ul><ul><ul><ul><li>Instead of </li></ul></ul></ul><ul><ul><ul><li>if(foo == bar) </li></ul></ul></ul><ul><ul><ul><li>{ </li></ul></ul></ul><ul><ul><ul><li>doSomething(); </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><li>Use “ elimination ” code to short circuit functions when not needed: </li></ul></ul><ul><ul><ul><li>if(isInDoItList(myval)) { </li></ul></ul></ul><ul><ul><ul><li>longChunkOfCode(); </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul>
    12. 14. Tips and Tricks <ul><ul><li>When querying for a business component, activate all fields via the ActivateField() method prior to executing the query (this is well documented in Siebel Bookshelf). </li></ul></ul><ul><ul><li>When querying for BCs try to use a “ForwardOnly” flag in the ExecuteQuery() method, this forces Siebel to create a forward only cursor which is more efficient than a bi-directional cursor. </li></ul></ul><ul><ul><li>Be very careful with using “SetFieldValue” within a “PreSetFieldValue” event due to possible undesired recursion. </li></ul></ul><ul><ul><li>You can’t throw an error message during the “OnLoad” logic of an applet, (the error goes nowhere). </li></ul></ul>