From ccc4377148b566621683476cb7673fab4bb04b9e Mon Sep 17 00:00:00 2001 From: Alan Jaouen Date: Fri, 1 Nov 2024 13:51:57 +0100 Subject: [PATCH] fixup! Add setRecord method to LogEntryEventBuilder for handling Set of Ids --- .../core/main/logger-engine/classes/LogEntryEventBuilder.cls | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nebula-logger/core/main/logger-engine/classes/LogEntryEventBuilder.cls b/nebula-logger/core/main/logger-engine/classes/LogEntryEventBuilder.cls index 3b1a1dce0..fe12ba025 100644 --- a/nebula-logger/core/main/logger-engine/classes/LogEntryEventBuilder.cls +++ b/nebula-logger/core/main/logger-engine/classes/LogEntryEventBuilder.cls @@ -467,7 +467,7 @@ 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 recordsIds) { + global LogEntryEventBuilder setRecord(Iterable recordsIds) { if (this.shouldSave() == false) { return this; } @@ -475,7 +475,7 @@ global with sharing class LogEntryEventBuilder { List records = new List(); for (Id recordId : recordsIds) { SObject record = recordId.getSObjectType().newSObject(); - record.put('Id', recordId); + record.Id = recordId; records.add(record); }