Thursday, May 24, 2012

Creating Custom Applet Method Menu Item

Although a piece of logic to be executed could be achieved through a button as well as Method Menu Item, the approach in configuring both is at variance.

Steps to configure Applet Method Menu Item:
  1.   Create a command object and associate a method (Either a Business Service method or Custom method)
  2.   Associate the command to the Applet Method Menu Item.
  3.    Provide a user property CanInvokeMethod to enable the invocation of the same.
  4.   Define the logic behind the method at Applet or BS that is associated to the command. These two approaches have been mentioned below in detail.
Configuring the logic through Browser Script of a Business Service:

  1. ·         Create a command with Target Property- Browser, give the BS Name and the method Name to be executed in the Business Service and Method Properties.
  2. ·         Browser value in the Target Property signifies that the logic is implemented in the browser script of the Business Service Method Specified.
  3. ·         Create user property at applet level with CanInvokeMethod: Method Name as TRUE (Method Name should be same as BS Method Name mentioned in the Command Object).
  4. ·         Logic that is to be implemented should be written in the browser script of the BS Method.
Configuring the logic through Browser Script of an Applet:

  1. ·         Create a command with Target Property- Browser Applet, give the Method Name to be executed in the Method property of the command.
  2. ·         Browser Applet value in the Target Property signifies that the logic is implemented in the browser script of the Applet.
  3. ·         Create user property at applet level with CanInvokeMethod: Method Name as TRUE.
  4. ·         Ensure that the logic is implemented at the browser script of the applet with same method name that is mentioned in the Method property of the command object created.
Note:  
Browser script had to be used instead of server script because the Command Object handles the same as mentioned below.
In the Command Object, Target Property value has an option called “Server”, when we try to enclose the logic in a Custom Method instead of using a Business Service Method, the method handler is initially the applet class to which the applet belongs.  Siebel CRM re targets it successively up through the applet class hierarchy to CSSSWEFrame. If still not handled, then Siebel CRM re targets to the business component class of the business component that the applet references, and successively upwards through the business component class hierarchy to CSSBusComp.

1 comment: