Siebel Developer's Reference > Operators and Expressions > Expressions >

Using the Invoke Service Method in a Calculated Field


The InvokeServiceMethod method calls a business service from a calculated field and returns OutputProp. If you configure Siebel CRM to call this method, then it is recommended that you use the following guidelines:

  • This method requires an input argument in the third field. If you do not specify this argument, then the calculated field does not provide a return value and a parsing error results. If the business service method does not require an input argument, then you must provide an argument as a placeholder. For example, if MyMethod does not use an input argument, then you can use code that is similar to the following:

    InvokeServiceMethod("MyService","MyMethod",
    "a=a","MyReturn")

  • If you configure Siebel CRM to send a field value instead of a string literal as an input argument, then you must enclose the field name in brackets. The following example uses input arguments that specify the value in the Name and Location fields:

    InvokeServiceMethod("MyService","MyMethod",
    "prop1=eval([Name]),prop2=eval([Location])","MyReturn")

    Siebel CRM evaluates the following code before it calls the business service:

    eval(expression)

  • The name of the return property in the calculated field, such as MyReturn in these examples, must match the name of a property in the output property set of the business service. If Siebel CRM cannot call the method due to this incorrect format, then it does not create an error and the calculated field is empty.

You must not display a calculation expression that calls a business service in a list applet. Doing so might result in poor performance because Siebel CRM repeatedly instantiates the business service each time it displays the field in the list.

Siebel Developer's Reference Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.