AxInternalBase.setFieldAsTouched Method [AX 2012]
Sets a field as touched.
Syntax
public void setFieldAsTouched(FieldId _fieldId)
Run On
Called
Parameters
- _fieldId
Type: FieldId Extended Data Type
The field ID for the field that is to be marked as touched.
Remarks
This instance method can be used by a consumer to use the defaulting logic in the AxBC class after a value has been assigned to a table field.
The method takes a field ID as a parameter, and when it is executed, it marks that the field has already been assigned a value. Executing modify or save will thereafter resolve the intra-table field relations, and default, any other fields that depend on the field, which is set as touched.
Examples
The following example applies to changing CustAccount on the SalesTable.
AxSalesTable axSalesTable;
SalesTable salesTable;
select firstonly salesTable;
axSalesTable = AxInternalBase::construct(salesTable);
axSalesTable.setFieldAsTouched(fieldNum(SalesTable, CustAccount));