SlideShare a Scribd company logo
Siebel Best Practices
By
Satish Vemula
There a Golden Rule that every Siebel Developer should
follow when it comes to scripting.
This golden rule is to never script unless there is no
other choice on meeting your requirements.
Scripting is the highest level of customization and adds
complexity and cost to the configuration. So scripting
should be your last resort. So the first practice is to avoid
script. So to avoid scripting, below are some
configuration methods every developer should think
before attempting to work with eScripts
User Properties
• This is a major feature in Siebel. An
example of this is “On Field Update Set”.
This is used instead of scripting on Set
Field Value event to change some other
value.
Calculated Fields
• Calculated fields come very handy when
we need to do validation. With the help of
Calculated Fields and User properties lot
of functional requirements are achieved
State Models
• State models help in restricting transitions
from one field value to other. So there is
no need to script to check the status
change.
Runtime Events
• This was introduced in 7.7 and has been
of significant help to the developers to on
invoking Workflows & Business Services
based on events. So avoid Business
Component events.
Workflows
• Instead of writing a big script, we can
break that down to a series of workflow
steps. We have steps Like Write, Update,
if condition, Sub-Process, Invoke Business
Service and lot of other key stuff.
Workflows are very efficient and
promising.
Scripting
• Though scripting should be avoided, it is
often common that scripting would
become necessary to meet our
requirements. So if scripted, it should be
done the most efficient way. There are
several optimization techniques. Below
are some and I will post more in the future.
Tip 1
• Avoid repeated calling of a function if the
results returned are the same. Instead
cache the value in a variable. Especially
avoid repeated calling of the API function
like TheApplication().ActiveViewName() as
shown below.
Tip2
• Delay Object Instantiation. If the object
being used is under a conditional
expression then wait till the conditional
statement actually evaluates true. This
reduces the cost and burden on the
server. See the code below.
Scripting Contd..
• Scripting often gets complicated with
heavily customized applications. Not every
business requirement can be met with just
configuration. So developers resort to
scripting. But if not properly implemented,
this could cause a lot of mess. Below are
some more Siebel recommended best
practices.
Tip3
• Use SetSearchSpec only on Indexed column. Before we
do ExecuteQuery in the script, we use SetSearchSpec to
retrieve only relevant records. SetSearchSpec also limits
the number of records retrieved which makes the
ExecuteQuery faster. But on what type of column we do
SetSearchSpec on is also very important. We should
always do a SetSearchSpec on indexed column so that
the records are retrieved very fast. This saves a lot of
burden and time on both application and database
servers.
Tip4
• When we use ExecuteQuery, we need not do execute
query again on child BC. ExecuteQuery on parent BC
also forces a query on all active child BC defined using
Links. For example in the screenshot below, consider
Account Object. There is Link defined between Account
and Action BC. So if a query is executed on Account BC,
only relevant Activity records pertaining to the records
Account BC are retrieved. This behavior is very similar to
searching in the Siebel application UI where if you have
Account –Action view and if you query on Account
applet, only activities relevant to are shown in the bottom
list applet.
Scripting Contd.
• Also, if you need to do a use SetSearchSpec on child
BC, do it before the ExecuteQuery. This way,
ExecuteQuery is done only once. Again this is similar to
searching in the Siebel Application UI. Below is the
screenshot with a simple code to demonstrate this.
• There is definitely scripting involved in any Siebel
implementation but is safe not to clutter with scripting. As
a developer s/he has to always think about the
performance impact as it could result in significant
downgrade of the system.
So here are few more best practices on Siebel eScripting.
Tip5
• Totally Avoid Scripting on Frequently Fired Events like
PreGetFieldValue and ChangeRecord Event.
• PreGetFieldValue event is triggered for every column under every
record that is retrieved. For instance if there are 10 records retrieved
in an applet and there are 10 columns or values in each record then
this event will be fired 100 times. This is a big number and could
grow dramatically. So it is a big NO NO for scripting on this event.
• ChangeRecord event is triggered every time a user navigates to
the next record. This will slow down the user completely. Users
would complain and if somewhere this BC is used for scripting
anywhere else, then this event will impact the performance that
scripts. So be very careful as this is definitely not recommended.
Tip6
• Browser Script causes burden on the application
to load. So heavy browser scripting should be
avoided. Additionally use only for simple client
side functionalities like validating values. Also
avoid browser scripts that require server side
roundtrip to get fast response. For example,
fetching values from the server database back
into the browser script would take time and
would result in slow response.
Tip7
• When you use ExecuteQuery() in eScripting, by default it uses
ForwardBackward mode where in it remember the past record and
would use some resources. Instead use ForwardOnly cursor mode
wherever possible as it improves performance by not having to
remember the past records that have already passed. By default it is
ForwardBackward and you will have to specify the cursor mode to
use ForwardOnly like oAccountBC.ExecuteQuery(ForwardOnly).
• There are several other ways to optimize Siebel scripting but it is
also very important to write the code in a way as to reduce the
maintenance efforts, help future reference and for best
understanding. So in this blog post about Siebel eScripting best
practices I will mention tips to address these essential skills needed.
Tip 8
• Consolidate Scripts to BC level script or Business Service level
script.
There are cases where in a same set block of script is being used at
multiple places. A simple example would be a script used in toggle
applets where there are multiple applets involved and each applet
could be having the same block of script addressing the same
functionality. For a developer, a small change in functionality would
require him to change multiple objects. This overhead can be
reduced if possible, by moving the functionality to either at the
Business Component level or at the Business Service level. Then
the developer would have to make changes to only one object which
effectively saves a lot of overhead and time.
Also keep in mind that lesser the code in your repository better the
maintenance efforts and would also help the upgrade process.
Tip 9
• Self-Document the scripts with Comments
I can’t stress enough on this trip. There are
always times when we look at the other person’s
code and we would always wonder why this was
done. Also even there are times when a year
later or so, our own code would look alien to us.
So always use comments sparingly.
Commenting is a wonderful way of conveying
the meaning of the code.
• Each code should start with a commented header explaining the purpose of
the code. Then comment the code appropriately at every sections of the
code to make the whole script self explanatory. Below is the sample function
header.
function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
/**********************************************************
* Name: AAG Service PreInvokeMethod
* Author: ABC
* Date Created: 01/25/2008
*
* Purpose/Description: Illustration of how comment header is used
*
* Inputs: Id, SR_ID
* Outputs: Returns status of BS
*
* Revision History:
* 9/9/09 — Satish — Added to update status of SR
* 9/10/09 — Satish — Added Email functionality, Enhancement SBL-320
************************************************************/
• The header shown above is the most common header used by many
developers. Feel free to use the above header in your code.
Tip 10
Browser Script versus Server Script
• The main purpose of Siebel Browser script is to extend the
functionality of the browser. So Browser script should be limited to
user based events. On the other side Server Side script is used for
data manipulation or anything beyond the capability of the browser.
• Browser script is recommended for:
• Communication with the user
• Interaction with desktop applications
• Data validation and manipulation limited to the current record
• Server script is recommended for:
• Query, insert, update, and delete operations
• Access to data beyond the current record
• So validate your requirement against this best practice.
Tip 11
Nullify Object Variables when no longer needed.
• Every variable under eScript that is referenced to an object (oBC =
TheApplication().GetBusComp(“Account”);) uses some memory to
hold that value. If the script exists abruptly the memory that is being
used to hold that value might not get released causing memory leak.
To avoid any kind memory leak it is a good practice to null those
variables (oBC = null;) after their use. Nulling those variables
releases the memory. Common object references that must be
nulled are
• Business Objects
• Property Sets
• Business Services
• Business Components
• Applets
The best spot to null these variables are under finally section of the
try-catch block of eScript as shown below.
try
{
oAccBO = TheApplication().GetBusObject(”Account”);
oAccBC = oAccBO.GetBusComp(”Account”);
sAccSerExpr = oAccBC. GetSearchExpr();
}
catch(e)
{
//Some Error Handling
}
finally
{
sAccSerExpr = null;
oAccBC = null;
oAccBO= null;
}
Observe that in the code I first null the child objects and then the
parent objects.
Tip 12
Get rid of unused code from the Repository
• Having a code that has been commented out or not being used
causes an unnecessary burden on the server to load the application
which could hit performance. If the code is no longer in use just
remove them from the objects. But before you delete them make
sure you archive (sif) or export it so that in future if you see realize
the need for it; you can just import them back into the application.
• Hope these tips helps. If you know of any tips and you would like me
to publish it over here, please write it and send it to me. I will be very
glad to post it over here.
• While I was working on eScript I came across the method
GetMVGBusComp which is one of Best Practices in eScripting and I
thought of posting it here. Details about this method below.
Tip 13
Use GetMVGBusComp Method to get the MVG records
• As the method name suggests it gets the Business Component of the record that MVG is
based on. This is a very helpful Method that would save a several lines of unnecessary code.
• For example, we have Accounts and there are Sales Reps associated to each of these
accounts. These Sales Reps are based on Position BC. Position BC is the MVG Business
Component of Account BC. The requirement is to get all the sales rep associated to the
details of all the sales rep associated to this account using eScript. Now a developer who is
writing this eScript and not aware of this Method would write an eScript something like this.
• Get Account Row ID
• Get Account Position BC
• Query for Account ID
• Get the corresponding Position Id
• Get Postion BC
• Query for that Postion Id from step 4
• Get Employee details from this Position BC
Instead we could write something like this
• Get Account RowId
• Get all the sales rep records using GetMVGBusComp
• Get Employee details from this Position BC.
Code for your reference
oAccBC = oAccBO.GetBusComp("Account");
//Get the corresponding Sales Rep Bus Comp — eScript Best practice
here.
var oAccPostnBC = oAccBC.GetMVGBusComp("Sales Rep");
//Add search spec to already filtered records
//No Need to get the Sales Rep that are associated to only this account
//The Method already gets sales rep that belongs to only this account
//Do not to use ClearToQuery here.
//You could add more Search Spec if you desire
oAccPostnBC.SetSearchSpec("Position Type","Partner Sales Rep");
oAccPostnBC.ExecuteQuery();
var rAccPostn = oAccPostnBC.FirstRecord();
//Here I am getting all the email Addresses
while(rAccPostn)
{
sEmailAddr = sEmailAddr + oAccPostnBC.GetFieldValue("Active
Email"a) + ";";
rAccPostn = oAccPostnBC.NextRecord();
}
Tip 14
Verify Existence of Valid Record after Querying
• After you execute the method ExecuteQuery()
make sure to check if there is at least one valid
record that you desire otherwise it might result in
an invalid scripting. For example in the code
above before I get the email addresses I check
there is a valid record returned from my
ExecuteQuery Method using the while
statement. Otherwise GetFieldValue on the BC
record will behave weird by throwing error. Also
you could use IF statement to check if you
expect the result to have just one record.
Views not visible – Reasons
I was implementing a new Siebel 8 application for my client and in
spite of everything working normal I realized that some views of
product configurator were missing. Then I started to investigate as
to why these views were not visible even for SADMIN. I checked few
different things and later we realized that the product configurator
functionality is an add-on license and which my client hasn’t bought.
So for this blog, I started to compile the Top 6 reasons as to why the
view is missing or might be not visible.
• The view does not include under your current Responsibility.
• View not registered.
• Missing or limited license keys
• View does not exist in the Siebel Repository. Forgot to compile?
• Personalization constraints (Profile Attributes)
• View might have been configured under a different Siebel Screen

More Related Content

What's hot

Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Edureka!
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overview
sapdocs. info
 
What's new in selenium 4
What's new in selenium 4What's new in selenium 4
What's new in selenium 4
Knoldus Inc.
 
Automatizacion de Pruebas
Automatizacion de PruebasAutomatizacion de Pruebas
Automatizacion de Pruebas
Guino Henostroza
 
6.documentacion de aplicaciones
6.documentacion de aplicaciones6.documentacion de aplicaciones
6.documentacion de aplicaciones
Jose Benítez Andrades
 
Siebel Upgrade Best Practices & Processes V2
Siebel Upgrade Best Practices & Processes V2Siebel Upgrade Best Practices & Processes V2
Siebel Upgrade Best Practices & Processes V2
Dr.Dinesh Chandrasekar PhD(hc)
 
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...
Edureka!
 
Capacitacitación Tester - QA 2
Capacitacitación Tester - QA 2Capacitacitación Tester - QA 2
Capacitacitación Tester - QA 2
Professional Testing
 
Testing microservices with rest assured
Testing microservices with rest assuredTesting microservices with rest assured
Testing microservices with rest assured
Kushan Shalindra Amarasiri - Technical QE Specialist
 
Siebel crm strategy and roadmap ()
Siebel crm strategy and roadmap ()Siebel crm strategy and roadmap ()
Siebel crm strategy and roadmap ()
crm2life
 
Low Latency OLAP with Hadoop and HBase
Low Latency OLAP with Hadoop and HBaseLow Latency OLAP with Hadoop and HBase
Low Latency OLAP with Hadoop and HBase
DataWorks Summit
 
SITIST 2015 Dev - Abap on Hana
SITIST 2015 Dev - Abap on HanaSITIST 2015 Dev - Abap on Hana
SITIST 2015 Dev - Abap on Hana
sitist
 
Siebel Open UI Debugging (Siebel Open UI Training, Part 7)
Siebel Open UI Debugging (Siebel Open UI Training, Part 7)Siebel Open UI Debugging (Siebel Open UI Training, Part 7)
Siebel Open UI Debugging (Siebel Open UI Training, Part 7)
Tech OneStop
 
End to end testing - strategies
End to end testing - strategiesEnd to end testing - strategies
End to end testing - strategies
anuvip
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with selenium
Tzirla Rozental
 
Hybrid framework
Hybrid frameworkHybrid framework
Hybrid framework
Sudhakar Mangi
 
Uft Basics
Uft BasicsUft Basics
Uft Basics
Archana Krushnan
 
Aprendendo Angular com a CLI
Aprendendo Angular com a CLIAprendendo Angular com a CLI
Aprendendo Angular com a CLI
Vanessa Me Tonini
 
Data weave 2.0 advanced (recursion, pattern matching)
Data weave 2.0   advanced (recursion, pattern matching)Data weave 2.0   advanced (recursion, pattern matching)
Data weave 2.0 advanced (recursion, pattern matching)
ManjuKumara GH
 
Tk2323 lecture 8 firebase
Tk2323 lecture 8   firebaseTk2323 lecture 8   firebase
Tk2323 lecture 8 firebase
MengChun Lam
 

What's hot (20)

Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overview
 
What's new in selenium 4
What's new in selenium 4What's new in selenium 4
What's new in selenium 4
 
Automatizacion de Pruebas
Automatizacion de PruebasAutomatizacion de Pruebas
Automatizacion de Pruebas
 
6.documentacion de aplicaciones
6.documentacion de aplicaciones6.documentacion de aplicaciones
6.documentacion de aplicaciones
 
Siebel Upgrade Best Practices & Processes V2
Siebel Upgrade Best Practices & Processes V2Siebel Upgrade Best Practices & Processes V2
Siebel Upgrade Best Practices & Processes V2
 
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...
 
Capacitacitación Tester - QA 2
Capacitacitación Tester - QA 2Capacitacitación Tester - QA 2
Capacitacitación Tester - QA 2
 
Testing microservices with rest assured
Testing microservices with rest assuredTesting microservices with rest assured
Testing microservices with rest assured
 
Siebel crm strategy and roadmap ()
Siebel crm strategy and roadmap ()Siebel crm strategy and roadmap ()
Siebel crm strategy and roadmap ()
 
Low Latency OLAP with Hadoop and HBase
Low Latency OLAP with Hadoop and HBaseLow Latency OLAP with Hadoop and HBase
Low Latency OLAP with Hadoop and HBase
 
SITIST 2015 Dev - Abap on Hana
SITIST 2015 Dev - Abap on HanaSITIST 2015 Dev - Abap on Hana
SITIST 2015 Dev - Abap on Hana
 
Siebel Open UI Debugging (Siebel Open UI Training, Part 7)
Siebel Open UI Debugging (Siebel Open UI Training, Part 7)Siebel Open UI Debugging (Siebel Open UI Training, Part 7)
Siebel Open UI Debugging (Siebel Open UI Training, Part 7)
 
End to end testing - strategies
End to end testing - strategiesEnd to end testing - strategies
End to end testing - strategies
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with selenium
 
Hybrid framework
Hybrid frameworkHybrid framework
Hybrid framework
 
Uft Basics
Uft BasicsUft Basics
Uft Basics
 
Aprendendo Angular com a CLI
Aprendendo Angular com a CLIAprendendo Angular com a CLI
Aprendendo Angular com a CLI
 
Data weave 2.0 advanced (recursion, pattern matching)
Data weave 2.0   advanced (recursion, pattern matching)Data weave 2.0   advanced (recursion, pattern matching)
Data weave 2.0 advanced (recursion, pattern matching)
 
Tk2323 lecture 8 firebase
Tk2323 lecture 8   firebaseTk2323 lecture 8   firebase
Tk2323 lecture 8 firebase
 

Similar to Siebel best practices

Grails Services
Grails ServicesGrails Services
Grails Services
NexThoughts Technologies
 
Appengine json
Appengine jsonAppengine json
Appengine json
Aurel Medvegy
 
Google app development
Google app developmentGoogle app development
Google app development
Aurel Medvegy
 
Google app developers
Google app developersGoogle app developers
Google app developers
Aurel Medvegy
 
Google development
Google developmentGoogle development
Google development
Aurel Medvegy
 
Google app
Google appGoogle app
Google app
Aurel Medvegy
 
Web software development
Web software developmentWeb software development
Web software development
Aurel Medvegy
 
Google app developer
Google app developerGoogle app developer
Google app developer
Aurel Medvegy
 
Google web tools
Google web toolsGoogle web tools
Google web tools
Aurel Medvegy
 
Google apps development
Google apps developmentGoogle apps development
Google apps development
Aurel Medvegy
 
Google app example
Google app exampleGoogle app example
Google app example
Aurel Medvegy
 
Create a google app
Create a google appCreate a google app
Create a google app
Aurel Medvegy
 
Google app engine own domain
Google app engine own domainGoogle app engine own domain
Google app engine own domain
Aurel Medvegy
 
Google webtools
Google webtoolsGoogle webtools
Google webtools
Aurel Medvegy
 
Google sites development
Google sites developmentGoogle sites development
Google sites development
Aurel Medvegy
 
Google app pricing
Google app pricingGoogle app pricing
Google app pricing
Aurel Medvegy
 
Google app engine json
Google app engine jsonGoogle app engine json
Google app engine json
Aurel Medvegy
 
Create google app
Create google appCreate google app
Create google app
Aurel Medvegy
 
Developer google apps
Developer google appsDeveloper google apps
Developer google apps
Aurel Medvegy
 
Google web tools kit
Google web tools kitGoogle web tools kit
Google web tools kit
Aurel Medvegy
 

Similar to Siebel best practices (20)

Grails Services
Grails ServicesGrails Services
Grails Services
 
Appengine json
Appengine jsonAppengine json
Appengine json
 
Google app development
Google app developmentGoogle app development
Google app development
 
Google app developers
Google app developersGoogle app developers
Google app developers
 
Google development
Google developmentGoogle development
Google development
 
Google app
Google appGoogle app
Google app
 
Web software development
Web software developmentWeb software development
Web software development
 
Google app developer
Google app developerGoogle app developer
Google app developer
 
Google web tools
Google web toolsGoogle web tools
Google web tools
 
Google apps development
Google apps developmentGoogle apps development
Google apps development
 
Google app example
Google app exampleGoogle app example
Google app example
 
Create a google app
Create a google appCreate a google app
Create a google app
 
Google app engine own domain
Google app engine own domainGoogle app engine own domain
Google app engine own domain
 
Google webtools
Google webtoolsGoogle webtools
Google webtools
 
Google sites development
Google sites developmentGoogle sites development
Google sites development
 
Google app pricing
Google app pricingGoogle app pricing
Google app pricing
 
Google app engine json
Google app engine jsonGoogle app engine json
Google app engine json
 
Create google app
Create google appCreate google app
Create google app
 
Developer google apps
Developer google appsDeveloper google apps
Developer google apps
 
Google web tools kit
Google web tools kitGoogle web tools kit
Google web tools kit
 

Recently uploaded

The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024
Yara Milbes
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
What’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete RoadmapWhat’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete Roadmap
Envertis Software Solutions
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
Karya Keeper
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
Tier1 app
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
safelyiotech
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
Reetu63
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
Maitrey Patel
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
ervikas4
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
kgyxske
 
Quarter 3 SLRP grade 9.. gshajsbhhaheabh
Quarter 3 SLRP grade 9.. gshajsbhhaheabhQuarter 3 SLRP grade 9.. gshajsbhhaheabh
Quarter 3 SLRP grade 9.. gshajsbhhaheabh
aisafed42
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
Patrick Weigel
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
kalichargn70th171
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 

Recently uploaded (20)

The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
What’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete RoadmapWhat’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete Roadmap
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
 
Quarter 3 SLRP grade 9.. gshajsbhhaheabh
Quarter 3 SLRP grade 9.. gshajsbhhaheabhQuarter 3 SLRP grade 9.. gshajsbhhaheabh
Quarter 3 SLRP grade 9.. gshajsbhhaheabh
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 

Siebel best practices

  • 2. There a Golden Rule that every Siebel Developer should follow when it comes to scripting. This golden rule is to never script unless there is no other choice on meeting your requirements. Scripting is the highest level of customization and adds complexity and cost to the configuration. So scripting should be your last resort. So the first practice is to avoid script. So to avoid scripting, below are some configuration methods every developer should think before attempting to work with eScripts
  • 3. User Properties • This is a major feature in Siebel. An example of this is “On Field Update Set”. This is used instead of scripting on Set Field Value event to change some other value.
  • 4. Calculated Fields • Calculated fields come very handy when we need to do validation. With the help of Calculated Fields and User properties lot of functional requirements are achieved
  • 5. State Models • State models help in restricting transitions from one field value to other. So there is no need to script to check the status change.
  • 6. Runtime Events • This was introduced in 7.7 and has been of significant help to the developers to on invoking Workflows & Business Services based on events. So avoid Business Component events.
  • 7. Workflows • Instead of writing a big script, we can break that down to a series of workflow steps. We have steps Like Write, Update, if condition, Sub-Process, Invoke Business Service and lot of other key stuff. Workflows are very efficient and promising.
  • 8. Scripting • Though scripting should be avoided, it is often common that scripting would become necessary to meet our requirements. So if scripted, it should be done the most efficient way. There are several optimization techniques. Below are some and I will post more in the future.
  • 9. Tip 1 • Avoid repeated calling of a function if the results returned are the same. Instead cache the value in a variable. Especially avoid repeated calling of the API function like TheApplication().ActiveViewName() as shown below.
  • 10.
  • 11. Tip2 • Delay Object Instantiation. If the object being used is under a conditional expression then wait till the conditional statement actually evaluates true. This reduces the cost and burden on the server. See the code below.
  • 12.
  • 13. Scripting Contd.. • Scripting often gets complicated with heavily customized applications. Not every business requirement can be met with just configuration. So developers resort to scripting. But if not properly implemented, this could cause a lot of mess. Below are some more Siebel recommended best practices.
  • 14. Tip3 • Use SetSearchSpec only on Indexed column. Before we do ExecuteQuery in the script, we use SetSearchSpec to retrieve only relevant records. SetSearchSpec also limits the number of records retrieved which makes the ExecuteQuery faster. But on what type of column we do SetSearchSpec on is also very important. We should always do a SetSearchSpec on indexed column so that the records are retrieved very fast. This saves a lot of burden and time on both application and database servers.
  • 15. Tip4 • When we use ExecuteQuery, we need not do execute query again on child BC. ExecuteQuery on parent BC also forces a query on all active child BC defined using Links. For example in the screenshot below, consider Account Object. There is Link defined between Account and Action BC. So if a query is executed on Account BC, only relevant Activity records pertaining to the records Account BC are retrieved. This behavior is very similar to searching in the Siebel application UI where if you have Account –Action view and if you query on Account applet, only activities relevant to are shown in the bottom list applet.
  • 16.
  • 17. Scripting Contd. • Also, if you need to do a use SetSearchSpec on child BC, do it before the ExecuteQuery. This way, ExecuteQuery is done only once. Again this is similar to searching in the Siebel Application UI. Below is the screenshot with a simple code to demonstrate this. • There is definitely scripting involved in any Siebel implementation but is safe not to clutter with scripting. As a developer s/he has to always think about the performance impact as it could result in significant downgrade of the system. So here are few more best practices on Siebel eScripting.
  • 18. Tip5 • Totally Avoid Scripting on Frequently Fired Events like PreGetFieldValue and ChangeRecord Event. • PreGetFieldValue event is triggered for every column under every record that is retrieved. For instance if there are 10 records retrieved in an applet and there are 10 columns or values in each record then this event will be fired 100 times. This is a big number and could grow dramatically. So it is a big NO NO for scripting on this event. • ChangeRecord event is triggered every time a user navigates to the next record. This will slow down the user completely. Users would complain and if somewhere this BC is used for scripting anywhere else, then this event will impact the performance that scripts. So be very careful as this is definitely not recommended.
  • 19. Tip6 • Browser Script causes burden on the application to load. So heavy browser scripting should be avoided. Additionally use only for simple client side functionalities like validating values. Also avoid browser scripts that require server side roundtrip to get fast response. For example, fetching values from the server database back into the browser script would take time and would result in slow response.
  • 20. Tip7 • When you use ExecuteQuery() in eScripting, by default it uses ForwardBackward mode where in it remember the past record and would use some resources. Instead use ForwardOnly cursor mode wherever possible as it improves performance by not having to remember the past records that have already passed. By default it is ForwardBackward and you will have to specify the cursor mode to use ForwardOnly like oAccountBC.ExecuteQuery(ForwardOnly). • There are several other ways to optimize Siebel scripting but it is also very important to write the code in a way as to reduce the maintenance efforts, help future reference and for best understanding. So in this blog post about Siebel eScripting best practices I will mention tips to address these essential skills needed.
  • 21. Tip 8 • Consolidate Scripts to BC level script or Business Service level script. There are cases where in a same set block of script is being used at multiple places. A simple example would be a script used in toggle applets where there are multiple applets involved and each applet could be having the same block of script addressing the same functionality. For a developer, a small change in functionality would require him to change multiple objects. This overhead can be reduced if possible, by moving the functionality to either at the Business Component level or at the Business Service level. Then the developer would have to make changes to only one object which effectively saves a lot of overhead and time. Also keep in mind that lesser the code in your repository better the maintenance efforts and would also help the upgrade process.
  • 22. Tip 9 • Self-Document the scripts with Comments I can’t stress enough on this trip. There are always times when we look at the other person’s code and we would always wonder why this was done. Also even there are times when a year later or so, our own code would look alien to us. So always use comments sparingly. Commenting is a wonderful way of conveying the meaning of the code.
  • 23. • Each code should start with a commented header explaining the purpose of the code. Then comment the code appropriately at every sections of the code to make the whole script self explanatory. Below is the sample function header. function Service_PreInvokeMethod (MethodName, Inputs, Outputs) { /********************************************************** * Name: AAG Service PreInvokeMethod * Author: ABC * Date Created: 01/25/2008 * * Purpose/Description: Illustration of how comment header is used * * Inputs: Id, SR_ID * Outputs: Returns status of BS * * Revision History: * 9/9/09 — Satish — Added to update status of SR * 9/10/09 — Satish — Added Email functionality, Enhancement SBL-320 ************************************************************/ • The header shown above is the most common header used by many developers. Feel free to use the above header in your code.
  • 24. Tip 10 Browser Script versus Server Script • The main purpose of Siebel Browser script is to extend the functionality of the browser. So Browser script should be limited to user based events. On the other side Server Side script is used for data manipulation or anything beyond the capability of the browser. • Browser script is recommended for: • Communication with the user • Interaction with desktop applications • Data validation and manipulation limited to the current record • Server script is recommended for: • Query, insert, update, and delete operations • Access to data beyond the current record • So validate your requirement against this best practice.
  • 25. Tip 11 Nullify Object Variables when no longer needed. • Every variable under eScript that is referenced to an object (oBC = TheApplication().GetBusComp(“Account”);) uses some memory to hold that value. If the script exists abruptly the memory that is being used to hold that value might not get released causing memory leak. To avoid any kind memory leak it is a good practice to null those variables (oBC = null;) after their use. Nulling those variables releases the memory. Common object references that must be nulled are • Business Objects • Property Sets • Business Services • Business Components • Applets
  • 26. The best spot to null these variables are under finally section of the try-catch block of eScript as shown below. try { oAccBO = TheApplication().GetBusObject(”Account”); oAccBC = oAccBO.GetBusComp(”Account”); sAccSerExpr = oAccBC. GetSearchExpr(); } catch(e) { //Some Error Handling } finally { sAccSerExpr = null; oAccBC = null; oAccBO= null; } Observe that in the code I first null the child objects and then the parent objects.
  • 27. Tip 12 Get rid of unused code from the Repository • Having a code that has been commented out or not being used causes an unnecessary burden on the server to load the application which could hit performance. If the code is no longer in use just remove them from the objects. But before you delete them make sure you archive (sif) or export it so that in future if you see realize the need for it; you can just import them back into the application. • Hope these tips helps. If you know of any tips and you would like me to publish it over here, please write it and send it to me. I will be very glad to post it over here. • While I was working on eScript I came across the method GetMVGBusComp which is one of Best Practices in eScripting and I thought of posting it here. Details about this method below.
  • 28. Tip 13 Use GetMVGBusComp Method to get the MVG records • As the method name suggests it gets the Business Component of the record that MVG is based on. This is a very helpful Method that would save a several lines of unnecessary code. • For example, we have Accounts and there are Sales Reps associated to each of these accounts. These Sales Reps are based on Position BC. Position BC is the MVG Business Component of Account BC. The requirement is to get all the sales rep associated to the details of all the sales rep associated to this account using eScript. Now a developer who is writing this eScript and not aware of this Method would write an eScript something like this. • Get Account Row ID • Get Account Position BC • Query for Account ID • Get the corresponding Position Id • Get Postion BC • Query for that Postion Id from step 4 • Get Employee details from this Position BC Instead we could write something like this • Get Account RowId • Get all the sales rep records using GetMVGBusComp • Get Employee details from this Position BC.
  • 29. Code for your reference oAccBC = oAccBO.GetBusComp("Account"); //Get the corresponding Sales Rep Bus Comp — eScript Best practice here. var oAccPostnBC = oAccBC.GetMVGBusComp("Sales Rep"); //Add search spec to already filtered records //No Need to get the Sales Rep that are associated to only this account //The Method already gets sales rep that belongs to only this account //Do not to use ClearToQuery here. //You could add more Search Spec if you desire oAccPostnBC.SetSearchSpec("Position Type","Partner Sales Rep"); oAccPostnBC.ExecuteQuery(); var rAccPostn = oAccPostnBC.FirstRecord(); //Here I am getting all the email Addresses while(rAccPostn) { sEmailAddr = sEmailAddr + oAccPostnBC.GetFieldValue("Active Email"a) + ";"; rAccPostn = oAccPostnBC.NextRecord(); }
  • 30. Tip 14 Verify Existence of Valid Record after Querying • After you execute the method ExecuteQuery() make sure to check if there is at least one valid record that you desire otherwise it might result in an invalid scripting. For example in the code above before I get the email addresses I check there is a valid record returned from my ExecuteQuery Method using the while statement. Otherwise GetFieldValue on the BC record will behave weird by throwing error. Also you could use IF statement to check if you expect the result to have just one record.
  • 31. Views not visible – Reasons I was implementing a new Siebel 8 application for my client and in spite of everything working normal I realized that some views of product configurator were missing. Then I started to investigate as to why these views were not visible even for SADMIN. I checked few different things and later we realized that the product configurator functionality is an add-on license and which my client hasn’t bought. So for this blog, I started to compile the Top 6 reasons as to why the view is missing or might be not visible. • The view does not include under your current Responsibility. • View not registered. • Missing or limited license keys • View does not exist in the Siebel Repository. Forgot to compile? • Personalization constraints (Profile Attributes) • View might have been configured under a different Siebel Screen