File tree Expand file tree Collapse file tree
sfdx-source/apex-common/main/classes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -161,11 +161,13 @@ public virtual class fflib_SObjects
161161 * @return Return a set with all the Id values of the given field
162162 */
163163 @TestVisible
164- protected Set <Id > getIdFieldValues (Schema.SObjectField field )
164+ protected virtual Set <Id > getIdFieldValues (Schema.SObjectField field )
165165 {
166166 Set <Id > result = new Set <Id >();
167167 for (SObject record : getRecords ())
168168 {
169+ if (record .get (field ) == null ) continue ;
170+
169171 result .add ((Id ) record .get (field ));
170172 }
171173 return result ;
@@ -177,11 +179,13 @@ public virtual class fflib_SObjects
177179 * @return Return a set with all the String values of the given field
178180 */
179181 @TestVisible
180- protected Set <String > getStringFieldValues (Schema.SObjectField field )
182+ protected virtual Set <String > getStringFieldValues (Schema.SObjectField field )
181183 {
182184 Set <String > result = new Set <String >();
183185 for (SObject record : getRecords ())
184186 {
187+ if (record .get (field ) == null ) continue ;
188+
185189 result .add ((String ) record .get (field ));
186190 }
187191 return result ;
You can’t perform that action at this time.
0 commit comments