Bugfix For Save Failures When Using Tagging + SYNCHRONOUS_DML
This release fixes issue #526 reported by @cbcruz74 (in discussion #511) - previously, using a combination of Nebula Logger's tagging system + the save method SYNCHRONOUS_DML
(shown in the snippet below) would fail, preventing some logging data from being saved.
Logger.info('hello').addTag('world');
Logger.saveLog(Logger.SaveMethod.SYNCHRONOUS_DML);
This was caused by code that relied on the standard field LogEntryEvent__e.EventUuid
- part of the tagging system internally used this field to track & create related LogEntryTag__c
records for new LogEntry__c
records. When using the save method SYNCHRONOUS_DML
, the EventUuid
is null, which broke the LogEntryTag__c
record creation.
A huge thank you to both @JMercie for working on this release (PR #539), and to @cbcruz74 for reporting the issue!
Core Unlocked Package Changes
New Field LogEntry__c.UniqueId__c
- Added new unique external ID field
LogEntry__c.UniqueId__c
- this field is now used to upsertLogEntry__c
records- This is populated with a composite key consisting of the fields
LogEntryEvent__e.TransactionId__c
andLogEntryEvent__e.TransactionEntryNumber__c
. The combination of these fields has been implicitly a unique composite key ever since the fieldTransactionEntryNumber__c
was introduced inv4.4.0
, but it wasn't being stored anywhere - now it is, in the newUniqueId__c
field
- This is populated with a composite key consisting of the fields
- Added the new
UniqueId__c
field to the FlexiPageLogEntryRecordPage
- Added the new
UniqueId__c
field to the permission setsLoggerAdmin
,LoggerLogViewer
, andLoggerEndUser
Bugfix For Save Failures When Using Tagging + SYNCHRONOUS_DML
- Updated
LogEntryEventHandler
class to leverage the new fieldLogEntry__c.UniqueId__c
for upserting & internally trackingLogEntry__c
records and their associatedLogEntryTag__c
records (instead of leveraging the standard fieldLogEntryEvent__e.EventUuid
)
Installation Info
Core Unlocked Package - no namespace
Full Changelog: v4.11.6...v4.11.7
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y000001HZfaQAG
- SFDX CLI:
sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y000001HZfaQAG
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001HZfaQAG
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001HZfaQAG