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
SriniKSriniK 

Namespace setting in API call

Hi
 
I wanted to find out whether there is way to declare namespace of managed package once in an API call like setting in header, or should it be appended for each custom fields.
 
Thanks
 
Srinik
SuperfellSuperfell
For the partner WSDL yes, see the defaultNamespace element on the CallOptions header.
SriniKSriniK

Thanks for your reply Simon, I searched for sample on how to set in call options, but could not find any.

Can please provide sample (syntax) on how to set. I am using .net.

Thanks a lot.

SriniK

SuperfellSuperfell
just like all the other headers
CallOptions co = new CallOptions();
co.defaultNamespace = "dudewhatever";
stub.CallOptionsValue = co;
stub.doSomething();
SriniKSriniK
Hi Simon, Thanks that helped me a lot. I was using  a older version of wsdl and in intellisense it was not showing up. Got the latest version of wsdl, and things are smooth.
 
I had one more question, what is clientid in making API calls, I read that it is needed to get app certified, if yes how can I obtain one for our integration application.
 
I appreciate your help
 
Thanks
SriniK
SuperfellSuperfell
Its the other way around, you get assigned one when your app is certified. You don't need one for a one-of integration.
SriniKSriniK

Thanks Simon ! :smileyhappy: