Improve fflib_SObjects2.getSObjectsByIdField

Add unit-test and method to domain template

Signed-off-by: WimVelzeboer <wimvelzeboer@protonmail.com>
This commit is contained in:
WimVelzeboer
2022-02-24 09:43:38 +00:00
parent acb5cdc98b
commit 969b0fbba7
3 changed files with 34 additions and 3 deletions
@@ -703,8 +703,8 @@ public virtual class fflib_SObjects2
* @return Returns a map with the records mapped to the given String field value
*
* @example
* Account account = Account.newInstance(records);
* Map<String, SObject> accountByName = account.getSObjectsByStringField(Account.AccountName);
* Accounts accounts = Account.newInstance(records);
* Map<String, List<SObject>> accountByName = accounts.getSObjectsByStringField(Account.AccountName);
*/
@TestVisible
protected virtual Map<String, List<SObject>> getSObjectsByStringField(Schema.SObjectField sObjectField)