My Code is below:
edtString is AxEdtString edtString;
now it currently returns 10, if this code for example hits code to lookup string size in field itself, if it hits the code to check edt string size if edt is available for example from table field SelfHealingOpportunity.ClassName it gives 120, while on this field i see its 81 string size, i need to get the value - 81, instead of 120, but both these codes below dont return 81, they either return 10 or 120,
if (tableFieldStrLen)
{
if(tableFields.getObject(i1) is AxTableFieldString)
{
AxTableFieldString fieldString = tableFields.getObject(i1);
if(!fieldString.ExtendedDataType)
{
conForExport = conIns(conForExport, conLen(conForExport)+1, fieldString.StringSize);
}
else
{
edtString = Microsoft.Dynamics.Ax.Xpp.MetadataSupport::GetEdt(fieldString.ExtendedDataType);
conForExport = conIns(conForExport, conLen(conForExport)+1, edtString.StringSize);
}
}
}