I have already gotten the data using the following loop. It gets the data just fine without using DACs. But when I try to determine if the datatype of the column in the GenericQuery is string or numeric, I seem to only find System.String or String. I don’t get the datatype of the underlying data element in the generic query - like refnbr is nvarch(15) or something like that. Anyone have any thoughts?
foreach (GenericResult resultRow in graph.Views["Results"].SelectMulti())
{
foreach (string key in resultRow.Values.Keys)
{
foreach (GIResult resultMap in PXSelectReadonly<GIResult, Where<GIResult.designID, Equal<Required<GIResult.designID>>, And<GIResult.objectName, Equal<Required<GIResult.objectName>>>>>.Select(graph, new object[] { templates.Current.DesignID.Value, key }))
{
var result = graph.Caches[resultRow.Values[key].GetType()].GetValue(resultRow.Values[key], resultMap.Field);
sLine = sLine + "\"" + result + "\"" + resultMap.Field.GetType().ToString() + resultMap.Field.GetTypeCode();
}
}
}
Best answer by Leonardo Justiniano
View original