Hi,
I am an amateur to Axapta. I am in a WCF integration project with AIF Webservices. How can I build a Query Criteria with multiple fields and queries. for eg: SQL QUERY LIKE:
(SELECT itemId,itemgroupid,itemname,dataareaid FROM INVENTTABLE WHERE dataareaid='12AC' and itemgroupid ='CEMENT01';)
How should I build the above query to fetch the above fields. Also how should I return the results as array in the same method WCF service.
ItemService.AxdItem axdItem = newAxdItem();
AxdEntity_InventTable objinventTable;
var inventItemColl = new ItemService.QueryCriteria();
var inventElement = newList<ItemService.CriteriaElement>();
//OR
inventElement.Add(new ItemService.CriteriaElement {
DataSourceName = "InventTable",
FieldName = "itemId",
Operator= ItemService.Operator.Range,
Value1="CON002"
,Value2="CON008"});
inventElement.Add(new ItemService.CriteriaElement
{
DataSourceName = "InventTable",
FieldName = "itemId,itemname,dataareaid",
Operator = ItemService.Operator.Equal,
Value1 ="*",Value2=""
});
inventItemColl.CriteriaElement = inventElement.ToArray();