Hi Martin, yes. I created a class that I am trying to consume from a simple desktop application in c# but it does not work.
This is my class in AX. I want to return all records from the table cusTable
[SysEntryPointAttribute(true), AifCollectionTypeAttribute('return', Types::Record)]
public List getCustomerNameList()
{
CustTable cusTable;
List list = new List(Types::Record);
// return in a list all Customer Name
while select * from cusTable
{
list.addEnd(cusTable);
}
return list;
}
When I try to distribute the service group I get this error:
Unable to generate service 'TestCustomerServiceDemo'.\n Error: Unable to create and return the AifCollectionTypeAttribute object for the.getAttributes() reflection API. Verify the parameters.
In c# I imported the service reference and I call the method:
ServiceReference1.CallContext context = new ServiceReference1.CallContext();
var request = new ServiceReference1.TestCustomerServiceDemoGetCustomerNameListRequest(context);
ServiceReference1.TestCustomerServiceDemoClient client = new ServiceReference1.TestCustomerServiceDemoClient();
var response = client.getCustomerNameList(request);
Can you help me please?