Show/Hide Toolbars

You access a service class for a particular object when you are using any of the ResourceService methods (create(), update(), read(), etc.). For example, if you need to use the update() method to update the name of an account, you need to access AccountService.

Note: If you are adding the custom code to a screen or rule, the API already has access to the object with that screen or rule. As a result, you do not need to access the service class for that object.

When you use the API, you must reference the service classes so that you can call or invoke methods that the service classes use. Accessing the service classes requires two parts:

A main utility class specific to the module, which you can use to retrieve service implementations. Platform is the main utility class for the TeamConnect enterprise module. If you look at the Platform class in the javadocs, you see a method that you can use to call each service class for ResourceService and TransationalService. For example, to access the account service using the Platform class, you use the following method:

platform.getAccountService()

A service class. Service classes provide access to API model classes. To access the account model classes using the main utility class method, you enter the following information:

oThe name of the service class

oA variable name for the method

oAn equal sign

oThe Platform method for the service class

For example, to access AccountService, enter the following code:

AccountService accountService = Platform.getAccountService();

Note: Before you can make a change to an object, you must access the service class for the object. If you are using objects from more than one service class in your code, you must access the service classes for both objects.

After you call the service class(es), you can use the API model classes to describe properties of TeamConnect objects and implement actions.