WebApplet_PreInvokeMethod Event
Siebel CRM calls the WebApplet_PreInvokeMethod event before it calls any of the following:
A specialized method for the Web applet.
A custom method that Siebel CRM calls through the oWebApplet object of the InvokeMethod method.
This method returns ContinueOperation or CancelOperation. For more information, see Caution About Using the Cancel Operation Event Handler.
For more information, see About Specialized and Custom Methods.
Format
WebApplet_PreInvokeMethod(methodName)
The arguments you can use with this format are the same as the arguments described in WebApplet_InvokeMethod Event.
Used With
Server Script
Examples
The following example is in Siebel eScript:
function WebApplet_PreInvokeMethod (MethodName)
{
switch (MethodName)
{
case "CustomMethod":
var applet = this;
var BC = applet.BusComp();
var ConId = BC.GetFieldValue("Contact Id");
var WshShell = COMCreateObject("WScript.Shell");
WshShell.Popup("My Custom Method was called. Here is the ID " + ConId);
return(CancelOperation);
break;
}
return (ContinueOperation);
}
The following example is in Siebel VB:
Function WebApplet_PreInvokeMethod (MethodName As String) As Integer
Dim iReturn As Integer
iReturn = ContinueOperation
Select Case MethodName
Case "CustomMethod"
Dim oBusComp As BusComp
Set oBusComp = Me.BusComp
Dim WshShell As Object
ConId = oBusComp.GetFieldValue("Contact Id")
Set WshShell = CreateObject("WScript.Shell")
WshShell.Popup("My Custom Method was called. Here is the ID " & ConId)
iReturn = CancelOperation
End Select
WebApplet_PreInvokeMethod = iReturn
End Function