File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
nebula-logger/core/main/logger-engine/classes Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -460,7 +460,11 @@ global with sharing class LogEntryEventBuilder {
460460 this .logEntryEvent .RecordSObjectClassification__c = ' Unknown' ;
461461 this .logEntryEvent .RecordSObjectType__c = ' Unknown' ;
462462 } else {
463- this .logEntryEvent .RecordId__c = record .Id ;
463+ try {
464+ this .logEntryEvent .RecordId__c = record .Id ;
465+ } catch (System .SObjectException ex ) {
466+ // Certain SObjectTypes (such as Platform Events) do not have the ID field; that's OK, just skip setting it
467+ }
464468 this .logEntryEvent .RecordSObjectClassification__c = getSObjectClassification (record .getSObjectType ());
465469 this .logEntryEvent .RecordSObjectType__c = record .getSObjectType ().toString ();
466470 this .logEntryEvent .RecordSObjectTypeNamespace__c = getSObjectTypeNamespace (record .getSObjectType ());
You can’t perform that action at this time.
0 commit comments