Skip to content

User Guide: SDKs > VoltMX Iris SDK > Invoking an Object Service > getObjectService Method

getObjectService Method

The getObjectService Method gets the current instance of the object service. The getObjectService method is invoked on the sdk instance; init must already have been successfully run before invoking this method.

Syntax

getObjectService(serviceName,{serviceType});

Parameters

Parameter Type Description
serviceName string Name of the object service
serviceType JSON object One of the following: "access" : "online" [default] "access" : "offline" "access" : "registeredObjectServiceName" [This is the name of the object service defined in the application]

Response

Returns the object service instance based on the value specified in serviceType. The default value is "online", which returns an OnlineObjectService Class instance. A value of "offline" returns an OfflineObjectService Class instance.