Siebel Object Interfaces Reference > Invoking Custom Methods with MiniButtons >

Invoking Custom Methods with MiniButtons

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

To invoke a custom method with a MiniButton

  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.

    function WebApplet_PreCanInvokeMethod (MethodName, &CanInvoke)
       if ( MethodName == "MyTest" )
          CanInvoke = "TRUE";
          return( CancelOperation );
       return (ContinueOperation);

  7. Add the following browser script to the applet you are using (for example, the Account List Applet).

    function Applet_PreInvokeMethod (name, inputPropSet)
       switch (name) {
          case "MyTest":
             alert( "Siebel 7 browser script!" );
       return ("ContinueOperation");

  8. Run any application that has access to accounts, and go to the Accounts screen.

    The new button should appear.

  9. Click Test.

    The Browser Script should display an alert box indicating "Siebel 7 Browser Script!"

Siebel Object Interfaces Reference