Hi Expert ,
I want to read Company Specific data from Dynamics AX 2009 . But i can't see any parameter where we can pass SenderId (CompanyName) . Below is the example read company specific data from Dynamics AX 2012 R2 :
<Start AX 2012>
ServiceReference5.CallContext context = new ServiceReference5.CallContext();
context.Company = "dat";
ServiceReference5.EcoResProductServiceClient axCustomerServiceClient = new ServiceReference5.EcoResProductServiceClient();
ServiceReference5.EntityKey customerEntityKey = new ServiceReference5.EntityKey();
customerEntityKey.KeyData = keyFieldList.ToArray();
List<ServiceReference5.EntityKey> customerEntityKeyList = new List<ServiceReference5.EntityKey>();
customerEntityKeyList.Add(customerEntityKey);
var readCustomer = axCustomerServiceClient.read(context, customerEntityKeyList.ToArray());
<End AX 2012>
Below is AX 2009 Code :
ServiceReference2009_ItemService.ItemServiceClient axCustomerServiceClient = new ServiceReference2009_ItemService.ItemServiceClient();
ServiceReference2009_ItemService.CriteriaElement ce = new ServiceReference2009_ItemService.CriteriaElement();
ce.FieldName = "ItemId";
ce.Operator = ServiceReference2009_ItemService.Operator.Equal;
ce.Value1 = txtReadValue.Text;
ServiceReference2009_ItemService.QueryCriteria axOrderQueryCriteria = new ServiceReference2009_ItemService.QueryCriteria();
axOrderQueryCriteria.CriteriaElement = new ServiceReference2009_ItemService.CriteriaElement[1] { ce };
var readCustomer = axCustomerServiceClient.find(axOrderQueryCriteria);
Please suggest how to pass SenderId(Company) when i read data from AX 2009 using Service ?
Thanks
Surajit Kundu