Open JAertgeerts opened 2 years ago
@JAertgeerts -- thanks for the PR. A couple of questions:
@ImJohnMDaniel The purpose of the domain is to allow easy access to the list of objects it contains. There are three primary types of methods on the domain; getters, setters and filter methods. The more standard setter methods we have in the fflib_SObjects domain class, the smaller the methods can become on the domain classes (e.g. Accounts).
This method allows for easy setting and Id field based on the provided map. An example would be the following method, which sets the Case.OwnerId based on the provided map. It check if the Case.AccountId is populated in the map, if so, then it takes the value of that key and sets it to the provided target field, the Case.OwernId.
public ICases setOwnerIdByAccountId(Map<Id, Id> UserIdByAccountId)
{
setFieldValueByMap(Case.AccountId, Case.OwnerId, UserIdByAccountId);
return this;
}
Since Salesforce is a bit limited with casting a Map<Object, Object> to a Map<Id, Id> we need another method overload.
@JAertgeerts, just following up on the request to provide matching code coverage for this method. Cheers!
This change is![Reviewable](https://reviewable.io/review_button.svg)