Skip to content

Commit

Permalink
fixup! Add setRecord method to LogEntryEventBuilder for handling Set …
Browse files Browse the repository at this point in the history
…of Ids
  • Loading branch information
alanjaouen committed Nov 1, 2024
1 parent 50df32e commit ccc4377
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -467,15 +467,15 @@ global with sharing class LogEntryEventBuilder {
* @param recordsIds The Set of `SObject` records ids related to the entry. Will be converted to list and the JSON of the list is automatically added to the entry
* @return The same instance of `LogEntryEventBuilder`, useful for chaining methods
*/
global LogEntryEventBuilder setRecord(Set<Id> recordsIds) {
global LogEntryEventBuilder setRecord(Iterable<Id> recordsIds) {
if (this.shouldSave() == false) {
return this;
}

List<SObject> records = new List<SObject>();
for (Id recordId : recordsIds) {
SObject record = recordId.getSObjectType().newSObject();
record.put('Id', recordId);
record.Id = recordId;
records.add(record);
}

Expand Down

0 comments on commit ccc4377

Please sign in to comment.