Siebel Object Interfaces Reference > Interfaces Reference > Applet Events >

Applet_InvokeMethod Event


The InvokeMethod event is triggered by a call to applet.InvokeMethod or a specialized method, or by a user-defined menu.

Syntax

Applet_InvokeMethod(name, inputPropSet)

Argument
Description

Name

The name of the method that is triggered.

inputPropSet

A property set containing arguments to be passed to the InvokeMethod event.

Returns

Not applicable

Usage

Typical uses include showing or hiding controls, or setting a search specification. When accessing a business component from this event handler, use this.BusComp(), rather than TheApplication.ActiveBusComp.

Used With

Browser Script

Example

Some special methods create, modify, or delete records. In some cases, events at the applet or business component level are triggered by these actions. If there is a requirement to perform a specific action before and after the method has been executed, these events can be used. In this example, code has been added to the PreInvokeMethod and InvokeMethod applet events to set and reset the flag and to the NewRecord server event to set the fields.

function Applet_PreInvokeMethod (name, inputPropSet)
{
   if (name == "Quote")
   {
      // Add code that needs to be executed BEFORE the special method
      // Set flag to "1"
      TheApplication().SetProfileAttr("flag","1");
   }

   return ("ContinueOperation");
}

function Applet_InvokeMethod (name, inputPropSet)
{
   if (name == "Quote")
   {
      // Add code that needs to be executed AFTER the special method
      // Reset the flag to "0"
      TheApplication().SetProfileAttr("flag","0");
   }

}

function BusComp_NewRecord ()
{
   if (TheApplication().GetProfileAttr("flag")== "1" )
   {
      this.SetFieldValue ("Field1", "Value1");
      this.SetFieldValue ("Field2", "Value2");
      . . . . .
   }

}

See Also

Applet_PreInvokeMethod Event
Application_InvokeMethod Event

Siebel Object Interfaces Reference