How to do AIF WebService company specific ?

I created local end points for company “B” and selected customerservice

In Dot net i used this customerservice as web reference.

In the windows form i added combobox and

i brought all AccountNum whose value is not ‘100010’.And my combobox is showing data but they are in company “A”.

My point is why it is taking custTable from company “A” and how can i tell the web service to take from “B”.

Is there any settings or configuration is required for this ?

Hi Satya,

In Visual Studio before going to take the data you need to specify the company by writing the below code.

CallContext ctx = new CallContext()


Company = “Company B”


I hope it will help you…



Hi Abbas,

Yes that option i tried but when am creating instance of callcontext it’s showing error as "Using System.Runtime.Remoting.Messaging.CallContext has no constructors defined"for which am unable to use context.Company =“DAT”;

Hi satya,

Dont give instead write Company = “DAT”.

Then right click → Go to definition of Company . If there is no such definition then check your Web service.

Pls tell me once how you have generated the web service through Inbound port or wht?



Hi Abbas,

I selected two services custCustomerGroupService and custCustomerService in AIF->Services

Then after clicking Generate button there i found these twos services in IIS where i can browse those two services respectively.

There is no inbound port here,it’s not AX 2012,that’s the problem…

Yes i selected DAT company in local end point.

And the code i am using in visual studio is…

CallContext callcontext;

Company =“DAT”;//as per your saying it is also showing error

Hi Satya,

Have you created the Local Endpoint for the required company and did you selected that endpoint into the EndPoint form.If so, then check wether that record has been activated or not?