If you are a
Siebel developer then you must have been
involved in writing siebel codes. Today, I am writing this post to highlight
some tips related to Siebel Scripting.
Comments:
Comments are one of the
essential ingrediant of Siebel code. When you write comments, you should keep
one thing in your mind that comments are not for you. Comments should be very
clear to other person.
Below is the
sample for reference.
/********************************************************************
* Function Name: Business Service Name.FunctionName
* Summary: Add Summary of the function
* Created By: Name of the Person
* Created On: YYYY-MM-DD
* Updated On:YYYY-MM-DD
* Update Summary: Add Summary of Updated portion of the function
********************************************************************/
Variable Declaration:
You should follow all the variable
declaration standards while declaring variables in your code. I am mentioning
few of them here below.
·
Use Casing when declaring variable, like
camelCasing, PascalCasing or UPPERCASING.
·
Variable name should be descriptive, like for
contact Id use s_contactId, contactId or ContactId.
·
Variable should be strongly declared, like
Below is the
sample for reference.
var sTxnId:String = Inputs.GetProperty("Txn Id");
var dTxnStrtDt:Date = null, dTxnEndDt:Date = null;
var sTxnType:String = null;
var oTxnBO:BusObject = TheApplication().GetBusObject(“Business Object
Name");
var oTxnBC:BusComp = oTxnBO.GetBusComp("Business Component Name");
Error
Handling:
Error Handling is
also one of the essential part of scripting, So use Try catch block in your
code to handle the errors as well.
try
{
// Main code goes here……….>>>>>>>>>>>
}
catch (e)
{
// Handle your errors
here……….>>>>>>>>>>>
}
finally
{
// Release all your variables
here……….>>>>>>>>>>>
}
No comments :
Post a Comment