function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How to set the client id field when calling APEX Webservice from outside??



I am calling APEX Webservice from .NET to do some updates to the Custom Objects. I am trying to do some API count reports and I see that the client id is blank on the WS calls from .NET. 

Is there a way I can set the client ID to some meaningful value so that I know for fact that the WS i am invoking is causing the API count.


Appreciate your response.


See page 788 of, under CallOptions header. Basically, using the Service namespace that you created from the WSDL, create a new CallOptions(), then set client to the name you wish your application to display, and finally, assign the CallOptions variable to the CallOptionsValue member of your binding. Example code in C# is provided at the bottom of page 788.