Configuring Siebel Open UI > Customizing Siebel Open UI for Siebel Mobile Disconnected > Methods You Can Use to Customize Siebel Mobile Disconnected >

Methods You Can Use in the Business Service Class


This topic describes methods that you can use that reside in the Business Service class. It includes the following information:

Invoke Method for Business Services

The Invoke method that you can use with a business service calls the CanInvokeMethod business service and the InvokeMethod business service. It returns a property set. It uses following syntax:

service.Invoke(method_name, psPropertySet);

where:

  • method_name is a string that identifies the business service method that the Invoke method calls. The Invoke method also calls the following methods:
    • CanInvokeMethod. Determines whether or not Siebel Open UI can call the business service method that method_name identifies. Any custom business service file you create must include the CanInvokeMethod business service method.
    • InvokeMethod. Calls the business service method that method_name identifies. Any custom business service file you create must include the InvokeMethod business service method.

      For more information about using these methods, see Using Siebel Business Services or JavaScript Services to Customize Siebel CRM Objects.

  • psPropertySet is a property set that the Invoke method sends to the method that method_name identifies.

The following example calls the CanAddSample method of the LS Pharma Validation Service business service:

var service = SiebelApp.S_App.GetService("LS Pharma Validation Service");
var outputSet = service.Invoke("CanAddSample", psPropertySet);

For an example that uses the Invoke method with a business service, see Using Custom Siebel Business Services.

ServiceRegistry Method

The ServiceRegistry method registers a custom business service method that you define. You must use it any time that you configure Siebel Open UI to call a custom business service method. It returns one of the following values:

  • true. Siebel Open UI successfully registered the method.
  • false. Siebel Open UI did not successfully register the method.

It uses following syntax:

SiebelApp.S_App.GetModel().ServiceRegistry(inputObj);

where:

  • inputObj is an object that specifies a set of properties, where each property specifies a name and a value. The number of properties varies according to object type. For a list of properties that you can use, see Properties You Must Include to Register Custom Business Services. The inputObj argument uses the following syntax:

    inputObj [oconsts.get("name")] = "value";

    where:

    • name specifies the property name
    • value specifies the property value

      For example, the following code specifies the DOUIREG_OBJ_NAME property with a value of Pharma Call Entry Mobile:

    inputObj [oconsts.get("DOUIREG_OBJ_NAME")] = "Pharma Call Entry Mobile";

    The following code specifies the property name:

    oconsts.get("DOUIREG_OBJ_NAME")

Siebel Open UI registers a method for a custom service when it loads the script files that it uses for this custom service. This configuration makes sure that Siebel Open UI calls the ServiceRegistry method from the correct location in the code. To view this code in the context of a complete example, see Using Custom JavaScript Methods.

Properties You Must Include to Register Custom Business Services

Table 15 describes the properties that you must include in the inputObj argument of the ServiceRegistry method when Siebel Open UI registers a custom business service. The local constants.js file defines each of these properties as a constant.

Table 15. Properties You Must Include to Register Custom Business Services
Properties
Value

DOUIREG_OBJ_NAME

The name of a custom business service. For example:

LS Pharma Validation Service

DOUIREG_SRVC_NAME

The name of the JavaScript class that the custom business service references. For example:

PharmaCallValidatorsvc

Table 16 describes the properties you must include in the inputObj argument of the ServiceRegistery method when Siebel Open UI registers a custom business service that references a predefined applet or a predefined business component.

Table 16. Required Input Properties for Custom Business Services That Reference Predefined Applets or Business Components
Property
Value

DOUIREG_OBJ_TYPE

Specifies that this business service method references an applet or a business component. You must use one of the following values:

  • Use DOUIREG_OBJ_TYPEAPPLET for an applet.
  • Use DOUIREG_OBJ_TYPEBUSCOMP for a business component.

DOUIREG_OBJ_MTHD

Name of the predefined business service method that you must customize. For example, WriteRecord.

DOUIREG_SRVC_NAME

The name of the JavaScript class that the Class property of the business service method references. For example:

pharmacallsvc

DOUIREG_SRVC_MTDH

Name of the business service method that you customized. For example, WriteRecord.

DOUIREG_EXT_TYPE

You can use one of the following values:

  • DOUIREG_EXT_TYPEPRE. Siebel Open UI runs the custom business service method, and then runs the predefined business service method. You must configure Siebel Open UI to set the Invoked property to true after it processes DOUIREG_EXT_TYPEPRE so that it does not make any more calls to this method.
  • DOUIREG_EXT_TYPEPOST. Siebel Open UI runs the predefined business service method, and then runs the custom business service method.
Configuring Siebel Open UI Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.