Bookshelf Home | Contents | Index | Search | PDF |
Siebel Employee Relationship Management Administration Guide > Employee Self-Service Reference >
Example eScript for Summary Form
The following script is used by summary forms.
function Script_Open ()
{
var PageFirstPage;
var QuestLastName;
var szLastName = "";
var szScriptSessionId = "";
var boCallScripts;
var bcCSRunAnswer;
// Get the handles to the page and the questions
PageFirstPage = GetPage ("PAF Summary");
QuestLastName = PageFirstPage.GetQuestion ("PAF Summary Employee Last Name");
// Set all the questions read-only
QuestLastName.SetQuestionEnable (false);
// Get the script session run id
szScriptSessionId = GetParameter ("Session.ScriptSessionId");
// Get the "Call Scripts" busobj and "Call Script Run Answers" buscomp
boCallScripts = TheApplication().GetBusObject ("Call Scripts");
bcCSRunAnswer = boCallScripts.GetBusComp("Call Script Run Answers");
// Query for the employee's last name
with (bcCSRunAnswer)
{
SetViewMode (AllView);
ClearToQuery ();
ActivateField ("Run Id");
ActivateField ("Page Name");
ActivateField ("Question Name" );
ActivateField ("Answer Text" );
SetSearchSpec ("Run Id", szScriptSessionId);
SetSearchSpec ("Page Name", "PAF Which Change");
SetSearchSpec ("Question Name", "Display Employee Last Name");
ExecuteQuery (ForwardOnly);
if (FirstRecord () != 0)
szLastName = GetFieldValue ("Answer Text");
}
bcCSRunAnswer = null;
boCallScripts = null;
// Set the values of each question by the scripting
QuestLastName.SetCurrentValue (szLastName);
return;
}
Bookshelf Home | Contents | Index | Search | PDF |
Siebel Employee Relationship Management Administration Guide Published: 18 April 2003 |