Configuring Siebel eBusiness Applications > Configuring the Customer Dashboard >

Example of Using Customer Dashboard Commands with Siebel VB


Below is an example script written in Siebel VB 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 eScript, see Siebel VB Language Reference.

Sub Script_Open

     Dim bs as Service
     Dim inpargs as PropertySet
     Dim outargs as PropertySet
     Dim fvalue as String

Open "d:\sabari.txt" for Output as #1
Set bs = TheApplication().GetService("Persistent Customer dashboard")
     Set inpargs = TheApplication.NewPropertySet
     Set outargs = TheApplication.NewPropertySet

     bs.InvokeMethod "GetCurrentContactId",inpargs,outargs
     fvalue = outargs.GetProperty("Contact Id")
     Write #1, "The current id in the dashboard = " & fvalue

     Inpargs.SetProperty "Field Name","Field 4"
     bs.InvokeMethod "GetDashboardFieldValue",inpargs,outargs
     fvalue = outargs.GetProperty("Field Value")
     Write #1," The Account Name in the dashboard = "& fvalue
     Close #1

End Sub

Configuring Siebel eBusiness Applications