Siebel eScript
Click here to load reader
-
date post
19-Oct-2014 -
Category
Technology
-
view
6.458 -
download
2
description
Transcript of Siebel eScript
Siebel eScriptSiebel eScript
22
GoSiebel.com
AgendaAgenda
What’s Siebel E-ScriptWhat’s Siebel E-Script Why to useWhy to use Where to useWhere to use When to useWhen to use How to useHow to use Tips and TricksTips and Tricks
33
GoSiebel.com
What’s Siebel E-ScriptWhat’s Siebel E-Script
A scripting languageA scripting language The core language is javascriptThe core language is javascript Siebel eScript provides access to Siebel eScript provides access to
local system calls through two local system calls through two objects, Clib and SElib,objects, Clib and SElib,
44
GoSiebel.com
Siebel Script --outlyingSiebel Script --outlying
Types of Scripts:Types of Scripts: There are two There are two types of scripting available:types of scripting available:
• Server Scripts (eScript or SiebelVB)Server Scripts (eScript or SiebelVB) Execute on the server for web clients or on Execute on the server for web clients or on
the client machine for mobile or dedicated the client machine for mobile or dedicated web clientsweb clients
• Browser Scripts (JavaScript)Browser Scripts (JavaScript) Downloaded to the client and are executed Downloaded to the client and are executed
within the browserwithin the browser
55
GoSiebel.com
66
GoSiebel.com
77
GoSiebel.com
Where to UseWhere to Use
Siebel ToolsSiebel Tools WebWeb
88
GoSiebel.com
When to useWhen to use
• Data Validation:Data Validation: Complex and Complex and business object/component data business object/component data relationship rules can be writtenrelationship rules can be written
• User Interaction:User Interaction: Specific messages Specific messages to users based on specific inputs – to users based on specific inputs – string concatenation is supportedstring concatenation is supported
• Integration:Integration: Transfer the data to and Transfer the data to and from the external system ,uses include from the external system ,uses include calling a business service, workflow, etccalling a business service, workflow, etc
99
GoSiebel.com
When to useWhen to use
1010
GoSiebel.com
How to UseHow to Use
Siebel eScript GuidelinesSiebel eScript Guidelines Siebel eScript CommandsSiebel eScript Commands
1111
GoSiebel.com
Siebel eScript GuidelinesSiebel eScript Guidelines
Declare your variablesDeclare your variables Consider case sensitivityConsider case sensitivity Use parentheses () with Use parentheses () with
functionsfunctions Use four-digit years in datesUse four-digit years in dates Use the Use the this this object referenceobject reference ……
1212
GoSiebel.com
Siebel eScript CommandsSiebel eScript Commands
Applet Object MethodsApplet Object Methods Application Object MethodsApplication Object Methods Business Component ObjectsBusiness Component Objects ……
1313
GoSiebel.com
Tips and TricksTips and Tricks
Scripts are always interpreted (all text in the script is Scripts are always interpreted (all text in the script is parsed), use parsed), use compact notationcompact notation where possible (for where possible (for example):example):
if(foo == bar)if(foo == bar) doSomething();doSomething();
Instead ofInstead of
if(foo == bar) if(foo == bar) {{ doSomething();doSomething(); }}
• Use “Use “eliminationelimination” code to short circuit functions when not ” code to short circuit functions when not needed:needed:
if(isInDoItList(myval)) {if(isInDoItList(myval)) { longChunkOfCode();longChunkOfCode(); }}
1414
GoSiebel.com
Tips and TricksTips and Tricks• When querying for a business component, activate all When querying for a business component, activate all
fields via the ActivateField() method prior to executing fields via the ActivateField() method prior to executing the query (this is well documented in Siebel Bookshelf). the query (this is well documented in Siebel Bookshelf).
• When querying for BCs try to use a “ForwardOnly” flag When querying for BCs try to use a “ForwardOnly” flag in the ExecuteQuery() method, this forces Siebel to in the ExecuteQuery() method, this forces Siebel to create a forward only cursor which is more efficient than create a forward only cursor which is more efficient than a bi-directional cursor.a bi-directional cursor.
• Be very careful with using “SetFieldValue” within a Be very careful with using “SetFieldValue” within a “PreSetFieldValue” event due to possible undesired “PreSetFieldValue” event due to possible undesired recursion.recursion.
• You can’t throw an error message during the “OnLoad” You can’t throw an error message during the “OnLoad” logic of an applet, (the error goes nowhere). logic of an applet, (the error goes nowhere).