Get field id from field name :
DictTable dt;
fieldId fId;
dt = new DictTable(tablenum(CustTable));
if (dt)
{
fId = dt.fieldName2Id("Pager");
print (strfmt("fId: %1", fId));
}