v4.14.14 - Added new Apex method & JavaScript function Logger.setField() #783
jongpie
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Many thanks to @surajp for sharing some awesome perspectives & suggestions for improving custom field mappings!
Custom field mappings were introduced a few months ago for Apex in
v4.13.14
, and for lightning components inv4.14.16
. Both releases provided the ability to set custom fields on individual log entries - but in situations where a custom field should be set on every generated log entry, setting the field on each entry was very repetitive & tedious & repetitive. It was also repetitive.Core Unlocked Package Changes
New Apex Method
Logger.setField()
Resolved #769 by adding a new static method,
Logger.setField()
. This gives Apex developers a way to set field(s) once per transaction, and the fields will be auto-populated on allLogEntryEvent__e
records generated in that transaction.The
setField()
method has 2 overloads (same as the instance method overloadsLogEntryEventBuilder.setField()
that were introduced in releasev4.13.14
)Logger.setField(Schema.SObjectField field, Object fieldValue)
- useful for easily setting the value for a single fieldLogger.setField(Map<Schema.SObjectField, Object> fieldToValue)
- useful for setting the value for multiple fieldsThe new method supplements the functionality introduced in release
v4.13.14
, as shown below:New JavaScript Function
logger.setField()
Added JavaScript support for setting fields once per component instance, using
logger.setField()
. This is the JS equivalent of the new Apex methodLogger.setField()
(above).Installation Info
Core Unlocked Package - no namespace
Full Changelog: v4.14.13...v4.14.14
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015oWIQAY
sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y0000015oWIQAY
This discussion was created from the release Added new Apex method & JavaScript function Logger.setField().
Beta Was this translation helpful? Give feedback.
All reactions