4

I am facing an issue with Change Data Capture

  1. I enabled the Change Data Capture (CDC) feature on Opportunity in the source ORG.
  2. I am able to write a trigger on the OpportunityChangeEvent in source ORG.
  3. Now, I created a cross-org external data source connection in a different ORG to the source ORG.
  4. I validated and synced the Opportunity Object from the Source Org. So, Opportunity__x is the external Object in my destination ORG.
  5. Now, I want to capture the changes on Opportunity (from source ORG) in the destination ORG.
  6. I tried creating a trigger on the Opportunity_ChangeEvent (on external object) in the destination ORG. But its failing.

How could I capture the change events on external Opportunity in the destination ORG? Is this supported in Salesforce? I see this is supported for OData 2.0/4.0 connections. But I don't see for the Cross-Org connections. If not supported, are there any other options to do this?

Please help me on this.

6
  • You need Salesforce Connect + cross-org adapter to surface SF objects from one org in another org. If you have all of that, you don't need CDC. Take a look at Integration Patterns for more info
    – identigral
    Sep 30, 2020 at 23:29
  • @identigral, I have that cross-org salesforce connect connection and I was able to visualize the data in the destination ORG. But I need to write a trigger on that external object for some internal processing. how can I do that?
    – speruri
    Sep 30, 2020 at 23:39
  • Right, now we see where you're going. You can't do a trigger on an external object but you can do a trigger on an External CDC event in the destination org. External CDC is almost but not quite identical to plain CDC, you might be missing a toggle of this feature on the data source. Double-check your setup versus help doc + the Codey example in there
    – identigral
    Oct 1, 2020 at 0:03
  • 1
    @identigral, the codey example is with Odata 4.0 but not with Cross-Org. There is no example for Triggers on External Objects for Cross-Org connections in that resource. And I also see 'Eligible for External Change Data Capture', 'Track Data Changes' only in the case of Odata 4.0 but not cross-org type in the data source.
    – speruri
    Oct 1, 2020 at 0:12
  • From the External Objects list , select the external object that you want to track. Click Edit, and select Track Data Changes . This is cross-org, the external object is from a foreign org.
    – identigral
    Oct 1, 2020 at 0:26

1 Answer 1

2

Currently (Winter '21) Change Data Capture still isn't supported for Cross-Org (or custom Apex) adapters--only OData 4.0 according to this documentation.

According to this June '19 recording from Salesforce, adding support for External CDC with Cross-Org adapters is on the "longer term" roadmap.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .