DictTable.Fieldobject(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an instance of the DictField class for the field that is specified by field ID.
public:
virtual System::Object ^ Fieldobject(int fieldId);
[Microsoft.Dynamics.Ax.Xpp.ReturnTypeCovariance("class", "DictField")]
public virtual object Fieldobject (int fieldId);
[<Microsoft.Dynamics.Ax.Xpp.ReturnTypeCovariance("class", "DictField")>]
abstract member Fieldobject : int -> obj
override this.Fieldobject : int -> obj
Public Overridable Function Fieldobject (fieldId As Integer) As Object
Parameters
- fieldId
- Int32
The ID of the field to create.
Returns
A DictField object for the field that is specified by the fieldId parameter; null, Nothing, nullptr, unit, a null reference (Nothing in Visual Basic) if the object could not be created.
- Attributes
Remarks
The following example shows how to create a DictField object for the fields in a table.
DictTable dt;
DictField df;
int i;
dt = new DictTable(tablenum(CustTable));
if (dt)
{
for (i=1; i <= dt.fieldCnt(); i++)
{
df = dt.fieldObject(dt.fieldCnt2Id(i));
if (df)
{
print df.name();
}
}
}