Disabling Added Context for Custom Validation Confirmation Messages
When you configure custom validation confirmation messages and enable the Add Context to Validation Message operation parameter, context is automatically added to all validation confirmation messages. In cases where validation messages already include context, you can configure the disableContext parameter in the custom validation code to disable the automation addition of context to specific messages.
To disable added context for custom validation confirmation messages:
1. In Max Designer, on the Developer Tools () launchpad menu, click Operations, and then in the list view, click a custom validation operation.
2. On the Sources tab, click a linked custom validation source, and then in the code, implement any of the following logic:
To add a validation error that affects the full record:
protected void addRecordValidationError(String errorMessage, boolean disableContext)
To add a field validation error:
protected void addFieldValidationError(String fieldFullIdentifier, boolean disableContext, String errorMessage)
To add a relationship validation error:
protected void addRelationshipValidationError(String relationshipFullIdentifier, boolean disableContext, String errorMessage)
To add a validation warning that affects all records:
protected void addRecordValidationWarning(String warningMessage, boolean disableContext)
To add a field validation warning:
protected void addFieldValidationWarning(String fieldFullIdentifier, boolean disableContext, String warningMessage, Object... params)
To add a relationship validation warning:
protected void addRelationshipValidationWarning(String relationshipFullIdentifier, boolean disableContext, String warningMessage, Object... params)
For more information:
Was this helpful?