Cisco Cisco Computer Telephony Integration Option 8.5 Reference Guide

Page of 152
 
A-9
Cisco ICM Software CTI Driver for Siebel 7 Reference Guide Release 6.0(0)
 
Appendix A      Business Service Script
Sample Script
 
SetViewMode( AllView );
ActivateField("Abstract");
ActivateField("All");
 ActivateField("Expiration 
Date/Time");
ActivateField("Body");
ActivateField("Position Id");
 
SetSearchSpec("Abstract", strAbstract);
ExecuteQuery( ForwardOnly );
 
if( FirstRecord() == 0)
{
// No Broadcast Message record exists for this Abstract;
// create a new record and set its Abstract field
NewRecord( 1 );// NewAfter = 1
SetFieldValue("Abstract", strAbstract);
SetFieldValue("Body", "---");// A non-empty value for this field is required
 SetFieldValue("All", 
"N");
 
SetFieldValue("Expiration Date/Time", "01/01/2000");// Already expired
 WriteRecord();
 
}
 
}
}
function RemoveUserFromBroadcast(strUserName, strMsgAbstract)
{
// RemoveUserFromBroadcast:
//
// Removes any association between the Employee having the given
// Siebel login name and the Broadcast Message used to send
// agent or skill group statistics.
// Find the Position used to send statistics to this user.
var strPositionId = FindPositionId(strUserName);
if (strPositionId == "")
{
ShowStatusText("Can't find or create Position for login name " + strUserName, 
true);
return;
}
// Find the Broadcast Message
var boBroadcastMessage = null;
var bcBroadcastMessage = null;