FLOW_ExecuteValidationRules.DTO_Response
Class
global inherited sharing class FLOW_ExecuteValidationRules.DTO_ResponseResponse DTO for the Execute Validation Rules invocable action. Contains the validation results including errors, warnings, and summary flags. Use hasErrors in a Decision element to determine whether to proceed with DML or display errors.
Since: 1.0
Fields
| Field | Description |
|---|---|
| global String errorMessage | Combined error message string containing all blocking error messages joined by newlines. |
| global List errors | List of blocking validation errors. |
| global Boolean hasErrors | True if any blocking validation errors occurred. |
| global Boolean hasWarnings | True if any warnings occurred. |
| global List warnings | List of validation warnings. |
Field Details
errorMessage
@InvocableVariable(description='Combined error message for simple display' label='Error Message') global String errorMessageType: String
Combined error message string containing all blocking error messages joined by newlines. Useful for simple text display in a Flow screen when you don't need to show individual field-level errors. Empty string if no errors occurred.
Since: 1.0
Example:
String value = instance.errorMessage;errors
@InvocableVariable(description='List of blocking validation errors' label='Errors') global List<DTO_FlowValidationError> errorsType: List
List of blocking validation errors. Each error contains the rule name, message, field name, severity, and record index. Display these in a custom LWC component like lwcValidationErrors for detailed field-level error presentation.
Since: 1.0
Example:
List<DTO_FlowValidationError> value = instance.errors;hasErrors
@InvocableVariable(description='True if validation failed with blocking errors' label='Has Errors') global Boolean hasErrorsType: Boolean
True if any blocking validation errors occurred. Use this in a Flow Decision element to determine whether to proceed with record save or redirect back to edit screen. Only errors with severity 'Error' that are not in shadow mode are considered blocking.
Since: 1.0
Example:
Boolean value = instance.hasErrors;hasWarnings
@InvocableVariable(description='True if validation produced warnings' label='Has Warnings') global Boolean hasWarningsType: Boolean
True if any warnings occurred. Warnings include validation rules with severity 'Warning' and rules running in shadow mode. These do not block the save operation but may be displayed to users for informational purposes.
Since: 1.0
Example:
Boolean value = instance.hasWarnings;warnings
@InvocableVariable(description='List of validation warnings' label='Warnings') global List<DTO_FlowValidationError> warningsType: List
List of validation warnings. Includes both warning-severity rules and errors from rules running in shadow mode. Shadow mode errors are captured here for monitoring purposes without blocking the save operation.
Since: 1.0
Example:
List<DTO_FlowValidationError> value = instance.warnings;