I am using the following code to get the record count from .NET Business Connector:
DynRec = DynAx.CreateAxaptaRecord("AddressCountryRegion");
DynRec.ExecuteStmt("select count(Name) from %1 where %1.Name like'I*'");
if (DynRec.Found)
MessageBox.Show((string)DynRec.get_Field("Name"));
Is there a better way to it? For example, get the record count as an integer?
In Ax you typically do a count on the RecId field. This is an int or int64 depending on your version of Ax.