Hi all.
I'm dealing with a new Ax2012 AIF webservices integration.
We have 2 great points to resolve, related with the FindKeys standard action.
FindKeys input uses a structure like this:
<ItemServiceFindKeysRequest>
<QueryCriteria>
<CriteriaElement>
<DataSourceName>InventTable</DataSourceName>
<FieldName>ItemId</FieldName>
<Operator>Equal</Operator>
<Value1>002</Value1>
<Value2>?</Value2>
</CriteriaElement>
</QueryCriteria>
</ItemServiceFindKeysRequest>
1.- Let's suppose we want to look for items that matches "00*"; this is, with wildcard. But this will not work, Ax tries to retireve an item with exactly that code. How can we perform or emulate wildcards in this case? (if you're about to ask "with an AND operation", read below)
2.- If we change the upper structure by other like
<ItemServiceFindKeysRequest>
<QueryCriteria>
<CriteriaElement>
<DataSourceName>InventTable</DataSourceName>
<FieldName>ItemId</FieldName>
<Operator>EqualOrGreater</Operator>
<Value1>002</Value1>
<Value2>?</Value2>
</CriteriaElement>
<CriteriaElement>
<DataSourceName>InventTable</DataSourceName>
<FieldName>Name</FieldName>
<Operator>Equal</Operator>
<Value1>Boss</Value1>
<Value2>?</Value2>
</CriteriaElement>
</QueryCriteria>
</ItemServiceFindKeysRequest>
We would expect to get all the items wich itemId is >= "002", AND Name is "Boss". Well, that's not the case. AIF performs a logical OR; this invalidates any possibility of selecting with more than a field criteria.
Duplicating the <QueryCriteria> doesn't work, AIF seems to be blind with that.
How can we make the AND operation between fields in an AIF FindKeys action query?