From 18d375b9af869bf9778b44bd92c3c2af549f1c12 Mon Sep 17 00:00:00 2001 From: wimvelzeboer Date: Tue, 2 Aug 2022 10:17:19 +0100 Subject: [PATCH] Change addError method to public and virtual It can be useful to add one error string to all the records of an domain, directly from a service class, therefore it needs to be public. Sometimes it is also useful to change its behavior just like the other addError methods, therefore adding virtual --- sfdx-source/apex-common/main/classes/fflib_SObjects.cls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfdx-source/apex-common/main/classes/fflib_SObjects.cls b/sfdx-source/apex-common/main/classes/fflib_SObjects.cls index 95c48ccf017..0fe2db20a63 100644 --- a/sfdx-source/apex-common/main/classes/fflib_SObjects.cls +++ b/sfdx-source/apex-common/main/classes/fflib_SObjects.cls @@ -79,7 +79,7 @@ public virtual class fflib_SObjects * * @param message The error message to add to each record */ - protected void addError(String message) + public virtual void addError(String message) { for (SObject record : getRecords()) {