Bookshelf Home | Contents | Index | Search | PDF |
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.
- 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- Right click the Applet and choose Edit Web Layout.
The Web layout editor appears.- 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.- Drag and drop the control the ButtonTest control onto an available location. When you release the mouse button, the button appears.
- Click Save and then choose File > Close.
- 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);
}- 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("CancelOperation");
break;
}
return ("ContinueOperation");
}- Run any application that has access to accounts, and go to the Accounts screen.
The new button should appear.
Bookshelf Home | Contents | Index | Search | PDF |
Siebel Object Interfaces Reference Published: 18 June 2003 |