Siebel Object Interfaces Reference > Invoking Custom Methods with MiniButtons >

Invoking Custom Methods


To invoke a custom method with a MiniButton

Be sure to set up Tools for the appropriate Target Browser Group.

  1. Choose an applet (for example, Account List Applet) and create a control with the following properties:

    Name = ButtonTest
    Caption = Test
    HTML Type = MiniButton
    Method Invoked = MyTest
  2. Right click the Applet and choose Edit Web Layout.

    The Web layout editor appears.
  3. Change the template mode on the Web Controls toolbar to 3: Edit List.

    A window opens with the available controls, including the one you just created.
  4. Drag and drop the control the ButtonTest control onto an available location. When you release the mouse button, the button appears.
  5. Click Save and then choose File > Close.
  6. To add a server script to the applet that enables the button, right-click the applet and choose Edit Server Scripts. Add the following script to the WebApplet_PreCanInvokeMethod() function:
  7. function WebApplet_PreCanInvokeMethod (MethodName, &CanInvoke)
    {
       if ( MethodName == "MyTest" )
       {
          CanInvoke = "TRUE";
          return( CancelOperation );
       }
       return (ContinueOperation);
    }

  8. Add the following browser script to the applet you are using (for example, the Account List Applet):
  9. function Applet_PreInvokeMethod (name, inputPropSet)
    {
       switch (name) {
          case "MyTest":
             alert( "Siebel 7 browser script!" );
             return("CancelOperation");
          break;
       }
       return ("ContinueOperation");
    }

  10. Run any application that has access to accounts, and go to the Accounts screen.
  11. The new button should appear.


 Siebel Object Interfaces Reference 
 Published: 18 June 2003