Bugfix: Added automatic string truncation for LogEntryEvent__e fields
Thanks to @TrangOul, @BastienRaoul, and @Damecek for reporting these issues!
Core Unlocked Package Changes
Automatic String Field Truncation for LogEntryEvent__e
Platform Event Records
- Fixed #589 (reported by @BastienRaoul) and fixed #592 (reported by @Damecek) by updating
LoggerDataStore.EventBus
to support usingDatabase.DmlOptions
for enabling automatic field truncation on platform events, using some custom truncation logic (platform events do not normally support usingDatabase.DmlOptions
).Logger
now passes an instance ofDatabase.DmlOptions
withAllowFieldTruncation == true
when publishingLogEntryEvent__e
records
Data Masking Optimizations
- Fixed #587 (reported by @TrangOul) by updating
LogEntryEventBuilder
to automatically truncate any provided String parameters before callingapplyDataMaskRules()
. This truncation is somewhat redundant with the string truncation now performed inLoggerDataStore
- but the use of data masking on certain String parameters necessitates an initial truncation before any other parsing occurs- Also removed several internal uses of
truncateFieldValue()
inLogEntryEventBuilder
, now thatLoggerDataStore
will automatically truncate platform event string fields
- Also removed several internal uses of
Installation Info
Core Unlocked Package - no namespace
Full Changelog: v4.12.5...v4.12.6
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y000001Mk5UQAS
- SFDX CLI:
sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y000001Mk5UQAS
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001Mk5UQAS
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001Mk5UQAS