diff --git a/framework/default/ortoo-core/default/classes/fflib-extension/SecureDml.cls b/framework/default/ortoo-core/default/classes/fflib-extension/SecureDml.cls index 6900822e2ae..92a05ca9674 100644 --- a/framework/default/ortoo-core/default/classes/fflib-extension/SecureDml.cls +++ b/framework/default/ortoo-core/default/classes/fflib-extension/SecureDml.cls @@ -617,8 +617,9 @@ public inherited sharing virtual class SecureDml extends fflib_SobjectUnitOfWork String label = Label.ortoo_core_fls_violation; String modeDescription = descriptionByMode.get( mode ); String sobjectTypeName = SobjectUtils.getSobjectName( sobjectType ); + String fieldsInViolationString = String.join( ListUtils.convertToListOfStrings( fieldsInViolation ), ', ' ); - throw new SecureDmlException( StringUtils.formatLabel( label, new List{ modeDescription, sobjectTypeName, fieldsInViolation.toString() } ) ) + throw new SecureDmlException( StringUtils.formatLabel( label, new List{ modeDescription, sobjectTypeName, fieldsInViolationString } ) ) .setErrorCode( FrameworkErrorCodes.DML_ON_INACCESSIBLE_FIELDS ) .addContext( 'sobjectTypeName', sobjectTypeName ) .addContext( 'fieldsInViolation', fieldsInViolation ) diff --git a/framework/default/ortoo-core/default/labels/ortoo-core-CustomLabels.labels-meta.xml b/framework/default/ortoo-core/default/labels/ortoo-core-CustomLabels.labels-meta.xml index 8c79860dce3..e28d24cef12 100644 --- a/framework/default/ortoo-core/default/labels/ortoo-core-CustomLabels.labels-meta.xml +++ b/framework/default/ortoo-core/default/labels/ortoo-core-CustomLabels.labels-meta.xml @@ -33,7 +33,7 @@ en_US false Message when FLS violation occurs on a DML operation. - Attempted to {0} {1} with fields that are not accessible: {2} + Attempted to {0} {1} with fields that are not accessible / updateable: {2} ortoo_core_crud_insert_violation