Siebel Tools Reference > Configuring the Customer Dashboard > Using Siebel VB Script and eScript >

Siebel eScript Example


The example below is a script, written in Siebel eScript, that uses the dashboard commands. It gets the contact ID, Field 4, and Field Time for the current record populated in the dashboard and prints those values to a file.

For more information about using Siebel eScript, see Siebel eScript Language Reference.

function Script_Open ()
{
   var fn1=Clib.fopen("d:\\sabari5.txt", "wt");
   var bs = TheApplication().GetService("Persistent Customer dashboard");
   var inpargs= TheApplication().NewPropertySet();
   var outargs = TheApplication().NewPropertySet();

   bs.InvokeMethod("GetCurrentContactId",inpargs,outargs);
   var fvalue = outargs.GetProperty("Contact Id");
   Clib.fprintf (fn1, "The current id in the dashboard = %s
\n",fvalue);

   inpargs.SetProperty("Field Name","Field 4");
   bs.InvokeMethod("GetDashboardFieldValue",inpargs,outargs);
   var fvalue = outargs.GetProperty("Field Value");
   Clib.fprintf (fn1, "The Account Name in the dashboard = %s \n",fvalue);

   inpargs.SetProperty("Field Name","Field Time");
   bs.InvokeMethod("GetDashboardFieldValue",inpargs,outargs);
   var fvalue = outargs.GetProperty("Field Value");
   Clib.fprintf (fn1, "The current time of the agent/customer in the dashboard = %s \n",fvalue);

   Clib.fclose(fn1);
return(ContinueOperation);
}


 Siebel Tools Reference, Version 7.5, Rev. A 
 Published: 18 April 2003