The most basic requirement in Siebel is adding a button on an applet and associating functionality to it. But when add a button in Siebel it is grayed out or in other words not enable by default you have to make it enable.
In this post I will write down the various ways that I know to enable a button.
While describing the steps I assume you have already added the button to applet by editing the web layout of that applet and the method name you have mentioned for that button is “MyMethod”
- Scripting at Applet PreCanInvoke method.
This is the most basic and the oldest way to enable a button. Steps to perform
- Select the applet on which you have added the button
- Right Click – Choose Edit Server Script Menu Option
- In WebApplet_PreCanInvokeMethod add the following lines of code
- if (MethodName == “MyMethod”)
CanInvoke = “TRUE”;
}The button on Applet should get enabled.
- Named Method Property
The second way to enable the button is using user property called Named Method n. Steps to enable the button.
- Go to the underlying BC of that Applet
- Choose Business Component User Property from object explorer
- Create a New Record and Enter the following information
- Name Field: Named Method 1
(where the number will be one more than the last named method user property)
- Value Field: “MyMethod”, “INVOKE”, “Quote Item”, “MyMethod”
This is the latest and simplest of all methods to enable the button. You can read in detail in the following post about Event Method