Configuring Siebel eBusiness Applications > Configuring the Customer Dashboard >

Example of Using Customer Dashboard Commands with Siebel eScript


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

For more information about using Siebel VB, 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);
}

Configuring Siebel eBusiness Applications