AxdBase.setTableFieldAsMandatory Method [AX 2012]
Specifies that the field should be mandatory in the schema and in the XML.
Syntax
public void setTableFieldAsMandatory(TableId tableId, str fieldName)
Run On
Server
Parameters
- tableId
Type: TableId Extended Data Type
The ID for the table returned by the tablenum function.
- fieldName
Type: str
The field name returned by the fieldstr function.
Remarks
This method should only be called when AxdBase.initMandatoryFieldsMap Method is overridden.
Examples
The following example shows how to specify a table field as mandatory.
this.setTableFieldAsMandatory(
tablenum(SalesLine),
fieldstr(SalesLine,SalesUnit));