When we enter in the world of Siebel development one of the first things that a developers try his hand on is adding a button to an applet and try to invoke functionality on click of it, which is generally a popup saying ‘Hello World’ if he is just out of college 🙂
But more often than not we end up getting error message like
The specialized method ‘%1’ is not supported on Business Component ‘%2’ used by Business Object ‘%3’.(SBL-DAT-00322)
This error appears because we have not handled the method in our scripting or we have missed a step or two while configuring that button.
Siebel scripting is event based which means that every user action results in some kind of event which should be handled either by the user or by Siebel.
For example clicking on “New” button results in triggering of a method called NewRecord which is handled by underlying classes of that buscomp. But I create a custom method say “MyMethod” there is no way for Siebel to know what this method should do? So, it is the responsibility of the user to handle this event. And we have to do it at some level it can be at BusComp or Applet.
Handling the event here means that there should be something like
If(MethodName == “MyMethod”)
In the above code the most important thing to note down is statement return (CancelOperation) which tells Siebel to stop the flow of events and return.
If I miss this statement then the flow of events will eventually reach Siebel classes and I will end up getting above mentioned error message as siebel classes doesn’t have the code to handle this custom method.
If you have created a custom method handle it at appropriate level and issue a return cancel operation statement. Let’s take an example
I have added a button on applet with method name as “MyMethod”
*You can also use technique described in EventMethod Post of renaming method name to EventMethodMyMethod which will help you to eliminate scripting at Applet PreCanInvoke method.
Now at underlying BC or Applet Server Script I will have to write code saying
if (MethodName == “MyMethod”)
Happy reading !!!