PCRuntimeLibrary::validateAttribute Method [AX 2012]

Validates the attribute definition with the solver and XML schema validations.

client server public static boolean validateAttribute(
    PCProductConfigurationModel _productModel, 
    EcoResCategoryAttribute _attribute, 
    Set _outErrorMessages, 
   [boolean _throwOnError])

Run On

Called

Parameters

_productModel
Type: PCProductConfigurationModel Table
The product model that contains the attribute.
_attribute
Type: EcoResCategoryAttribute Table
The specific attribute to validate.
_outErrorMessages
Type: Set Class
The string set that receives the error message string if the validation fails.
_throwOnError
Type: boolean
A Boolean value that indicates whether the method should throw an exception if an error is found; optional.

Return Value

Type: boolean
true if the validation of the attribute succeeds; otherwise, false.

ExceptionCondition
Error

The _productModel, _attribute and _outErrorMessages parameters are null or undefined.

-or-

The _throwOnError parameter is set to true and the validation of the attribute fails.

Show: