This documentation is archived and is not being maintained.
FormDataObject.mandatory Method [AX 2012]
Sets or returns a value that indicates whether the data field is mandatory.
public boolean mandatory([boolean value])
Run On Client
Parameters
value
Type: boolean
The value to assign to the mandatory property of the field.
Return Value Type:
boolean
true if the field is mandatory; otherwise, false .
The following example shows how to retrieve and set the mandatory property for the field.
// Return the value of the mandatory property.
info (strfmt("mandatory: %1", fdo.mandatory()));
// Set the value of the mandatory property.
fdo.mandatory(false);