I would like to retrieve things like CreatedBy.Name
on Salesforce Change Data Capture. How may I accomplish it?
I have looked into Enrich Change Events with Extra Fields, which mentions that Lookups are supported.
I can enrich with direct fields (e.g. CreatedById
or other text fields) by creating a custom channel via platformEventChannels
+ platformEventChannelMembers
. See below an example of platformEventChannelMembers
:
<?xml version="1.0" encoding="UTF-8" ?>
<PlatformEventChannelMember xmlns="http://soap.sforce.com/2006/04/metadata">
<enrichedFields>
<name>CreatedById</name>
</enrichedFields>
<eventChannel>Channelname__chn</eventChannel>
<selectedEntity>Object__ChangeEvent</selectedEntity>
</PlatformEventChannelMember>