FormDataSource.object Method [AX 2012]
Returns an instance of the FormDataObject class that has the specified ID.
public FormDataObject object(FieldId fieldId, [int arrayIndex])
Run On
ClientReturn Value
Type: FormDataObject ClassAn instance of the FormDataObject class that has the ID that is specified in the objectId parameter.
The following example creates a FormDataObject object for the RepositoryFolder field in the SysVersionControlParameters table, and then sets the AllowEdit property for the field to true.
public void initFormDatasource(FormDataSource _formDataSource)
{
FormDataObject dataObject = _formDataSource.object(
fieldnum(SysVersionControlParameters, RepositoryFolder));
if (dataObject)
{
dataObject.allowEdit(true);
}
}
Community Additions
ADD
Show: