Thursday, March 1, 2018

Send Email using Script



Today we will see how to send email in Siebel using script.

We know that we can send email by pressing F9 button in siebel client. Now let us see how to send email using script.
We can send email with the native Siebel email client in the following ways:
  • From the application-level menu, choose File > Send Email.
  • Press F9.
  • Click to the right of Initiate Work Item on the communications toolbar, then click Send Email, or click Initiate Work Item when the displayed ToolTip text is "Send Email."



Generally siebel vanilla uses Outbound Communication Manager to send email. This is nothing but a vanilla business service used to send email. We are going to use the same business service in script to send the email. We can add attachment also to the email we are sending using script.




Using the below script we can send email using Outbound Communication Manager.


var mailBS = TheApplication().GetService("Outbound Communications Manager");

var psInput = TheApplication().NewPropertySet();

var psOutput = TheApplication().NewPropertySet();

psInput.SetProperty("CommProfile", "Communication profile name");

psInput.SetProperty("MsgToList", "email ids to whom you want to send email");

psInput.SetProperty("MsgBody", "email content");

psInput.SetProperty("MsgSubject", "subject");

mailBS.InvokeMethod("SendMessage", psInput, psOutput);




Thanks! for reading the post. Hope this is helpful.

Clear Temp Files, Folders, Cookies

Clear Temp Files and Folders


Here we are going to see the commands used to clear all the temporary files and empty folders.
While using system continuously we will end up in creating huge number of temporary files.
This will slow down the system which will result in slow response of the system and time taken for opening an application will be more

del /q /s  "c:\winnt\temp\*.*"
del /q /s  "c:\windows\temp\*.*"
del /q /s  "%USERPROFILE%\Local Settings\Temp\*.*"
del /q /s  "%USERPROFILE%\Local Settings\Temporary Internet Files\*.*"
del /q /s  "%USERPROFILE%\Cookies\*.*"

Remove Directory:

This is optional command. It is not mandatory to run the below command. The above command holds good.

Rmdir /q /s "%USERPROFILE%\Local Settings\Temporary Internet Files"
Rmdir /q /s "%USERPROFILE%\Local Settings\Temp"
Rmdir /q /s "%USERPROFILE%\Cookies\*.*"
Rmdir /q /s "c:\winnt\Temp"
Rmdir /q /s "c:\windows\Temp"



Make Directory:

This is optional command. It is not mandatory to run the below command.  These commands should be run only when all rmdir is executed. 

md  "%USERPROFILE%\Local Settings\Temporary Internet Files"
md  "%USERPROFILE%\Local Settings\Temp"
md  "%USERPROFILE%\Cookies"
md  "c:\winnt\Temp"
md  "c:\windows\Temp"

Thanks! for reading the post. Hope this is helpful.

Logged in Position's Child Position Count



In this post we are going to see the SQL used to find logged in position's child position count. Using this SQL we can find the count of child position added to a parent position.


Siebel will show all the records mapped to the user's active position and its child position in user interface.

Using this SQL we can estimate approximate count of records displayed for position in the User interface.

User Child Position Count SQL:


Select a.party_id, count(*)
from siebel.s_party_rpt_rel a,
siebel.s_party b,
siebel.s_party_per c
where a.party_id =c.party_id
and c.person_id = (Select row_id from siebel.s_user where login = '')
and a.sub_party_id = b.row_id
group by a.party_id;


Thanks! for reading the post. Hope this is helpful.

Performance Analysis | Set Siebel Session


Let us see how to find the correct cost (performance) of SQL while running in SQL Developer.

First thing needs to be done while working on performance is to alter the session of SQL developer. With this, SQL will run as it is running from Siebel client.

Following parameters are set by Siebel for better performance of SQL in Siebel server. We should set the same parameters in SQL developer to find the correct cost of the SQL.
ALTER SESSION SET OPTIMIZER_MODE = FIRST_ROWS_10;
ALTER SESSION SET HASH_JOIN_ENABLED = FALSE;
ALTER SESSION SET "_OPTIMIZER_SORTMERGE_JOIN_ENABLED" = TRUE;
ALTER SESSION SET "_OPTIMIZER_JOIN_SEL_SANITY_CHECK" = TRUE;
ALTER SESSION SET "_always_semi_join"=OFF;
ALTER SESSION SET "_sort_elimination_cost_ratio"=5;

To find the difference in execution time, run the SQL without setting above parameters and after setting these parameters.