Skip to main content
15 votes
Accepted

How do I see debug logs for Change Data Capture triggers in Salesforce?

As with How do I see debug logs for Platform Event triggers in Salesforce?, the trigger here is asynchronous and runs as the Automated Process entity rather than the user to initiated the transaction. ...
Daniel Ballinger's user avatar
11 votes

Change Data Capture

Change Data Capture : Receive near-real-time changes of Salesforce records, and synchronize corresponding records in an external data store. Change Data Capture publishes data change events, which ...
Hemavantha Rajesh Varma Mudunu's user avatar
11 votes
Accepted

Change Data Capture vs Platform Events vs Replication API vs Streaming API vs Batch Data Synchronization

The replication API is designed to have synchronization windows of at least five minutes, so would not be suitable for synchronization of shorter periods. Most ETL tools also don't support windows of ...
sfdcfox's user avatar
  • 497k
10 votes
Accepted

Will Change Data Capture eventually replace PushTopics/Streaming API?

There are a lot of considerations behind this and I'm not on the engineering teams that are behind these features so take my answer with a grain of salt. The TL;DR is yes, Change Data Capture (CDC) ...
POZ's user avatar
  • 4,419
8 votes
Accepted

Change Data Capture

CDC and Platform Events are really different use cases. Platform Events are a generalized event-driven, publish/subscribe mechanism. You can publish Platform Events to represent record changes (in ...
David Reed's user avatar
  • 93.2k
8 votes
Accepted

Cannot subscribe to Capture Data Changes (CDC) channel using EMP Connector

CDC events only fire when you enable CDC from Setup. You can enable Change Data Capture from Setup -> Change Data Capture and Select Objects for whom you wanna enable CDC
Pranay Jaiswal's user avatar
7 votes
Accepted

Trigger.OldMap equivalent in ChangeEvent?

The Change Data Capture feature targets synchronization of changes to some persistent store. Because of this fact, each event only contains enough information to apply a specific change to a stored ...
David Reed's user avatar
  • 93.2k
6 votes
Accepted

Change event triggers contain default value

Answer from John Brock at Salesforce: This is not expected behavior and we have a bug logged. If you have a case filed, please let me know so I can get it linked up to the right ticket. The ...
Daniel Hoechst's user avatar
5 votes
Accepted

LWC emp API track field is not rendering

Thats because of lexical scoping. this will refer to the emp channel and not class. To get the scope of Class in callback, you should use arrow function (as it does not have its own scope) Change ...
salesforce-sas's user avatar
5 votes

Send Change Data Capture events from Managed Package

You can package selection of objects for CDC. N/A - they're packageable. N/A. The limit no longer applies to managed packages: The maximum number of entity selections of 5 applies to selections ...
David Reed's user avatar
  • 93.2k
5 votes
Accepted

Is Salesforce planning to retire or stop supporting Outbound Messages?

According to the Data Integration Salesforce Architects Guide, Salesforce recommends using caution before choosing to build with Outbound Messages: Use caution if you choose to build with Outbound ...
Swisher Sweet's user avatar
4 votes
Accepted

Can the cometd library be used in Salesforce to listen to external buses?

If the external bus supports the Bayeux protocol, then you could use the same CometD library and code to subscribe to both the Salesforce bus and the external bus. The solution in this case would be ...
John Brock's user avatar
4 votes

Can the cometd library be used in Salesforce to listen to external buses?

As of now, we do not have a way to subscribe to the external event bus which is always on. You have to use a middleware to subscribe to external event bus and then push same into SF event bus. We use ...
Pranay Jaiswal's user avatar
4 votes

Can the cometd library be used in Salesforce to listen to external buses?

I'm assuming you want this to be something running in Apex and not something that relies on Visualforce or Lightning Component. If you want to have Salesforce subscribe to an event, you will need to ...
Daniel Hoechst's user avatar
4 votes
Accepted

Sending External ID Fields in change data capture(CDC) payload

As Adam mentioned there's an "Change Data Capture Enrichment" closed pilot that started in Winter '20 and is continuing in Spring '20: https://releasenotes.docs.salesforce.com/en-us/spring20/release-...
POZ's user avatar
  • 4,419
4 votes
Accepted

Why would I use Streaming API over Outbound Messages?

Outbound messaging is primarily server-driven. If your server went down for some reason, and you bring it back up, it would have to wait for messages to be delivered from Salesforce, which could take ...
sfdcfox's user avatar
  • 497k
4 votes
Accepted

Add Async Triggers into a Managed Package

Yes this feature is available for managed package . In order to test this i created a simple package with the below code Trigger code trigger AccountChangeAsyncTrigger on AccountChangeEvent (after ...
Mohith Shrivastava's user avatar
4 votes

Change Data Capture vs Queueable Apex

The main difference between them is "context". A Queueable (or a @future) is called by the developer. It can be called in any operation (trigger, visualforce, flow, schedule, Aura/LWC, etc), but we ...
Fernando Gavinho's user avatar
4 votes
Accepted

Change Data Capture - Update Events in bulk

The change that's depicted in a Change Data Capture event applies to any and all records present in getRecordIds(). It's a distinctly different model than with regular Apex triggers, where the ...
David Reed's user avatar
  • 93.2k
4 votes
Accepted

Is it possible to retrieve Case ID on case creation with Change Data Capture?

I think it does give the case Id. Check the JSON part "recordIds": [ "5003X00002GqR6OQAV" ]
vishnu.b's user avatar
4 votes

Publishing CDC with Apex trigger

You will want to use the AccountChangeEvent object instead of Account in your trigger header. trigger MyTrigger on AccountChangeEvent (after insert)
sfdcfox's user avatar
  • 497k
4 votes
Accepted

Does Platform Event / CDC uses same Async queue as Queueable/ Future?

You'll see that AsyncApexJob lists out what mechanisms use it Represents an individual Apex sharing recalculation job, a batch Apex job, a method with the future annotation, or a job that implements ...
Kris Goncalves's user avatar
4 votes
Accepted

How to implement Change Data Capture in LWC component

CDC is the right way to go. Here is the example above using it... Required configuration for org: Go to Setup and type Change Data Capture in Quick Find then select it Type Opportunity in Type to ...
nstuyvesant's user avatar
3 votes

Subscribing to a Channel with an Invalid ReplayId?

Best practice is to store replay ID value in your target system. You can then use it on resubscription to retrieve events from SF that are missing from your target. This works for short failure ...
identigral's user avatar
  • 7,687
3 votes

Including External ID in CDC

Well, the requirement is quite unique, I can come up with 2 solutions. 1) Using CDC and Platform Events: You write Async Trigger on Object, then you query the External ID for those records and Fire a ...
Pranay Jaiswal's user avatar
3 votes
Accepted

Including External ID in CDC

As far as I can tell, it's not. The Change Data Capture CREATE and UNDELETE events include all field values already, so they're not the issue. The problem lies in the UPDATE and DELETE events. The ...
David Reed's user avatar
  • 93.2k
3 votes

Trigger Flow from Change Data Capture Event (CDC)

This is currently not available. It seems that if you want to do something similar with flow you can use flow triggers. But I understand that this is not an ideal answer. Currently only platform ...
Moosecouture's user avatar
3 votes
Accepted

Change Event Trigger is not available for FeedItem

As can be seen in This list here, Salesforce does not have Support for Change Data Capture on every single Standard Object. FeedItem is among those not mentioned.
dschib's user avatar
  • 128
3 votes

Does Platform Event / CDC uses same Async queue as Queueable/ Future?

Does CDC/Platform Event uses the same Async Queue which System.enqueueJob (Queueable) uses? No. Platform Events are not actually async executions; they are essentially synchronous executions in a ...
Phil W's user avatar
  • 37k
3 votes
Accepted

Does Change Data Capture have a mechanism to output all existing records when it is turned on?

No. CDC only goes forward, the same as if you just deployed a new Record-Triggered Flow or other automations. You'll still need to mirror the data in a traditional manner (i.e. query every record in ...
sfdcfox's user avatar
  • 497k

Only top scored, non community-wiki answers of a minimum length are eligible