1
0
-1

Hi Guys, 

ServiceLocator.getServiceForName(serviceName) has been deprecated. 

The alternative is getClientService(clientId, serviceName, serviceVersion )

clientId - the OID of the client the service belongs to (optional; if not set, only global services will be considered)

Where can I find the of a clientId service?

Cheers,

Fred

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Hi Fred,

      did you make any progress with this?

      I found that the following code can be used to get the ID:

      Long clientCode = new ClientDao().getClientByName("myClientName").getId()

      then you can use the ID for further processing

      Hope that helps.


      Thanks

      Mark

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi Fred,

        I think the 'clientId' in the above method refers to the Client Code for the Organisation where the target service exists.

        So, if you look at Forms > Organisations, the table has a column for 'Organisation Name' and 'Client Code'.


        That allows you to 'get' a service from a specific client, rather than from the global namespace.

        Hope that helps.


        Thanks

        Mark

          CommentAdd your comment...