Thursday, November 3, 2022

Get field id from field name - Dynamics 365 FO

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)); 

}