Customizing Predefined Applets

The example in this topic registers a custom method that customizes a predefined applet. The work you do in this topic is very similar to the work you do in Customizing Predefined Business Components. The only difference occurs when you specify the input object for the applet and the type of object.

To customize predefined applets

  • Do Step 1 through Step 6 in the topic Customizing Predefined Business Components with the following differences:

    • For Step 2, Step c, in the topic Customizing Predefined Business Components specify the applet where Siebel Open UI applies your customization. In this example, you specify the Pharma Call Entry Mobile applet:

      inputObj [oconsts.get("DOUIREG_OBJ_NAME")] = "Pharma Call Entry Mobile";
      
    • For Step 2, Step d, in the topic Customizing Predefined Business Components specify the type of object that you are customizing. You specify an applet instead of a business component:

      inputObj [oconsts.get("DOUIREG_OBJ_TYPE")] = 
      oconsts.get("DOUIREG_OBJ_TYPEAPPLET");
      

      The following code is the completed code for this topic:

      if (typeof (SiebelApp.pharmacallsvc) === "undefined") {   
        SiebelJS.Namespace('SiebelApp.pharmacallsvc');   
        var oconsts = SiebelApp.Offlineconstants;   
        var inputObj = {};   
        inputObj [oconsts.get("DOUIREG_OBJ_NAME")] = "Pharma Call Entry Mobile";   
        inputObj [oconsts.get("DOUIREG_OBJ_TYPE")] =   
      oconsts.get("DOUIREG_OBJ_TYPEAPPLET");   
        inputObj [oconsts.get("DOUIREG_OBJ_MTHD")] = "InvokeMethod";   
        inputObj [oconsts.get("DOUIREG_SRVC_NAME")] = "pharmacallsvc";   
        inputObj [oconsts.get("DOUIREG_SRVC_MTDH")] = "InvokeMethod";   
        inputObj [oconsts.get("DOUIREG_EXT_TYPE")] = oconsts.get("DOUIREG_EXT_TYPEPRE");   
        SiebelApp.S_App.GetModel().ServiceRegistry(inputObj);   
        SiebelApp.pharmacallsvc = (function () {   
        function pharmacallsvc() {   
          }   
          SiebelJS.Extend(pharmacallsvc, SiebelApp.ServiceModel);   
          pharmacallsvc.prototype.InvokeMethod = function (psInputArgs) {//get the inputs   
            var psOutArgs = SiebelApp.S_App.NewPropertySet();   
          return psOutArgs;//return the outputs   
        };   
        return pharmacallsvc;   
        } ());   
      }