Siebel Employee Relationship Management Administration Guide > Employee Self-Service Reference >

Example eScript for Requestor Form


The following script is used to link an employee self-service business process to the unified approvals inbox. In this example, the script is linked to the approval type called PAFChange.

function Script_Finish ()

{

var szScriptSessionId;

var szRequester;

var svc;

var indata;

var outdata;

// Cancel saving everything to the database

Cancel ();

indata =TheApplication ().NewPropertySet ();

outdata = TheApplication ().NewPropertySet ();

// Get the login name of the user

szRequester = TheApplication ().LoginName ();

// Get SmartScript Save Session table Id.

szScriptSessionId = GetSessionId ();

// ItemObjectId, ItemType, ItemSubmittedBy, and ItemDescription are the

// required input arguments for the "Universal Inbox.Initialize"

indata.SetProperty ("ItemObjectId", szScriptSessionId);

// Item Type is the Approvals Inbox type defined in the

// Approvals Inbox Administration screen

indata.SetProperty ("ItemType", "PAFChange");

// Short Description of the inbox item

indata.SetProperty ("ItemDescription", szScriptSessionId);

indata.SetProperty ("ItemSubmittedBy", szRequester);

// ItemQueueDuration, ItemPriority, and ItemComments are the

// optional input arguments for the "Universal Inbox.Initialize"

indata.SetProperty ("ItemQueueDuration", "129600");

indata.SetProperty ("ItemPriority", "High");

indata.SetProperty ("ItemComments", "Comments from Employee Self-Service");

svc = TheApplication ().GetService ("Universal Inbox");

svc.InvokeMethod("Initialize", indata, outdata);

}


 Siebel Employee Relationship Management Administration Guide 
 Published: 18 April 2003