Partilhar via


DictTable.Fieldcnt2id Method

Definition

Overloads

Fieldcnt2id(Int32, TableScope)
Fieldcnt2id(Int32)

Returns the field ID of the field that is specified by an index.

Fieldcnt2id(Int32, TableScope)

public:
 virtual int Fieldcnt2id(int cnt, Microsoft::Dynamics::Ax::Xpp::TableScope tableScope);
public virtual int Fieldcnt2id (int cnt, Microsoft.Dynamics.Ax.Xpp.TableScope tableScope);
abstract member Fieldcnt2id : int * Microsoft.Dynamics.Ax.Xpp.TableScope -> int
override this.Fieldcnt2id : int * Microsoft.Dynamics.Ax.Xpp.TableScope -> int
Public Overridable Function Fieldcnt2id (cnt As Integer, tableScope As TableScope) As Integer

Parameters

cnt
Int32
tableScope
TableScope

Returns

Applies to

Fieldcnt2id(Int32)

Returns the field ID of the field that is specified by an index.

public:
 virtual int Fieldcnt2id(int cnt);
public virtual int Fieldcnt2id (int cnt);
abstract member Fieldcnt2id : int -> int
override this.Fieldcnt2id : int -> int
Public Overridable Function Fieldcnt2id (cnt As Integer) As Integer

Parameters

cnt
Int32

Returns

The field ID of the field that is specified by an index.

Remarks

The following example shows the retrieval of the fields of a table by index.

DictTable dt; 
int       i, fId, tId; 
DictField df; 
str       strFieldName; 
tId = tablenum(CustTable); 
dt = new DictTable(tId); 
if (dt) 
{ 
    for (i=1; i <= dt.fieldCnt(); i++) 
    { 
        fId = dt.fieldCnt2Id(i); 
        df = new DictField(tId, fId); 
        strFieldName = (df ? df.name() : ""); 
        print(strfmt("%1) %2 %3", i, fId, strFieldName)); 
    } 
}

Applies to