Share via


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

  • 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));

See Also

AxdBase Class

AxdBase.setParmMethodAsMandatory Method