Change Data Capture - Update Events in bulkChange Data CaptureDurable Message Replay from Change Data CaptureCannot subscribe to Capture Data Changes (CDC) channel using EMP ConnectorGetting “before-update” info in Change Data Capture (CDC) eventsHow do I see debug logs for Change Data Capture triggers in Salesforce?Change event triggers contain default valueInclude activation of change data capture event in managed package subscriber org

How would you identify when an object in a Lissajous orbit needs station keeping?

Handwriting Music

Is there any practical application for performing a double Fourier transform? ...or an inverse Fourier transform on a time-domain input?

Immutable builder and updater

Is it possible to generate a leveled character in borderlands 2?

How to respectfully refuse to assist co-workers with IT issues?

French abbreviation for comparing two items ("vs")

What is the difference between Major and Minor Bug?

Did a flight controller ever answer Flight with a no-go?

How do I, an introvert, communicate to my friend and only colleague, an extrovert, that I want to spend my scheduled breaks without them?

Why do banks “park” their money at the European Central Bank?

Is it possible to perform a regression where you have an unknown / unknowable feature variable?

Why is there so little discussion / research on the philosophy of precision?

Is there any method of inflicting the incapacitated condition and no other condition?

Who was president of the USA?

What is a CirKle Word™?

LeetCode: Group Anagrams C#

How many US airports have 4 or more parallel runways?

An interview question: What's the number of String objects being created?

Did the British navy fail to take into account the ballistics correction due to Coriolis force during WW1 Falkland Islands battle?

How to gently end involvement with an online community?

Remarkable applications of Dickson's lemma

Is using a hyperlink to close a modal a poor design decision?

What are some interesting features that are common cross-linguistically but don't exist in English?



Change Data Capture - Update Events in bulk


Change Data CaptureDurable Message Replay from Change Data CaptureCannot subscribe to Capture Data Changes (CDC) channel using EMP ConnectorGetting “before-update” info in Change Data Capture (CDC) eventsHow do I see debug logs for Change Data Capture triggers in Salesforce?Change event triggers contain default valueInclude activation of change data capture event in managed package subscriber org






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I am writing a trigger in Change Data Capture (CDC) on an update of an event record (EventChangeEvent). I am getting the updated fields in the EventChangeEvent object record. Problem I am facing is how to tie the update field to the records which was just updated. If I am updating a single records I get the record id by doing header.getRecordIds[0] but when I am updating records in bulk there is no way to tie the updated fields to the actual record id.
Here's the documentation of the message payload of the CDC event:



https://developer.salesforce.com/docs/atlas.en-us.change_data_capture.meta/change_data_capture/cdc_message_structure.htm



and



https://developer.salesforce.com/docs/atlas.en-us.change_data_capture.meta/change_data_capture/cdc_event_fields_header.htm










share|improve this question






























    1















    I am writing a trigger in Change Data Capture (CDC) on an update of an event record (EventChangeEvent). I am getting the updated fields in the EventChangeEvent object record. Problem I am facing is how to tie the update field to the records which was just updated. If I am updating a single records I get the record id by doing header.getRecordIds[0] but when I am updating records in bulk there is no way to tie the updated fields to the actual record id.
    Here's the documentation of the message payload of the CDC event:



    https://developer.salesforce.com/docs/atlas.en-us.change_data_capture.meta/change_data_capture/cdc_message_structure.htm



    and



    https://developer.salesforce.com/docs/atlas.en-us.change_data_capture.meta/change_data_capture/cdc_event_fields_header.htm










    share|improve this question


























      1












      1








      1








      I am writing a trigger in Change Data Capture (CDC) on an update of an event record (EventChangeEvent). I am getting the updated fields in the EventChangeEvent object record. Problem I am facing is how to tie the update field to the records which was just updated. If I am updating a single records I get the record id by doing header.getRecordIds[0] but when I am updating records in bulk there is no way to tie the updated fields to the actual record id.
      Here's the documentation of the message payload of the CDC event:



      https://developer.salesforce.com/docs/atlas.en-us.change_data_capture.meta/change_data_capture/cdc_message_structure.htm



      and



      https://developer.salesforce.com/docs/atlas.en-us.change_data_capture.meta/change_data_capture/cdc_event_fields_header.htm










      share|improve this question














      I am writing a trigger in Change Data Capture (CDC) on an update of an event record (EventChangeEvent). I am getting the updated fields in the EventChangeEvent object record. Problem I am facing is how to tie the update field to the records which was just updated. If I am updating a single records I get the record id by doing header.getRecordIds[0] but when I am updating records in bulk there is no way to tie the updated fields to the actual record id.
      Here's the documentation of the message payload of the CDC event:



      https://developer.salesforce.com/docs/atlas.en-us.change_data_capture.meta/change_data_capture/cdc_message_structure.htm



      and



      https://developer.salesforce.com/docs/atlas.en-us.change_data_capture.meta/change_data_capture/cdc_event_fields_header.htm







      change-data-capture






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 12 at 0:05









      Json Bourne ShellJson Bourne Shell

      1691 silver badge15 bronze badges




      1691 silver badge15 bronze badges























          1 Answer
          1






          active

          oldest

          votes


















          3















          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 sObject's identity is primary. In CDC events, the primary payload is the change data itself, and the header tells you to which records the the change applies.



          This behavior is described in Change Event Header Fields:




          recordIds: One or more record IDs for the changed records. Typically, this field contains one record ID. But if the same change occurred in multiple records of the same object type during the same transaction, Salesforce groups the change notifications and sends one change event for all affected records. In this case, the recordIds field contains an array of record IDs for all records that have the same change







          share|improve this answer

























          • Thank you. It took a comment from you for me to wrap my head around it.

            – Json Bourne Shell
            Aug 12 at 0:21













          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "459"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f273178%2fchange-data-capture-update-events-in-bulk%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3















          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 sObject's identity is primary. In CDC events, the primary payload is the change data itself, and the header tells you to which records the the change applies.



          This behavior is described in Change Event Header Fields:




          recordIds: One or more record IDs for the changed records. Typically, this field contains one record ID. But if the same change occurred in multiple records of the same object type during the same transaction, Salesforce groups the change notifications and sends one change event for all affected records. In this case, the recordIds field contains an array of record IDs for all records that have the same change







          share|improve this answer

























          • Thank you. It took a comment from you for me to wrap my head around it.

            – Json Bourne Shell
            Aug 12 at 0:21















          3















          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 sObject's identity is primary. In CDC events, the primary payload is the change data itself, and the header tells you to which records the the change applies.



          This behavior is described in Change Event Header Fields:




          recordIds: One or more record IDs for the changed records. Typically, this field contains one record ID. But if the same change occurred in multiple records of the same object type during the same transaction, Salesforce groups the change notifications and sends one change event for all affected records. In this case, the recordIds field contains an array of record IDs for all records that have the same change







          share|improve this answer

























          • Thank you. It took a comment from you for me to wrap my head around it.

            – Json Bourne Shell
            Aug 12 at 0:21













          3














          3










          3









          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 sObject's identity is primary. In CDC events, the primary payload is the change data itself, and the header tells you to which records the the change applies.



          This behavior is described in Change Event Header Fields:




          recordIds: One or more record IDs for the changed records. Typically, this field contains one record ID. But if the same change occurred in multiple records of the same object type during the same transaction, Salesforce groups the change notifications and sends one change event for all affected records. In this case, the recordIds field contains an array of record IDs for all records that have the same change







          share|improve this answer













          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 sObject's identity is primary. In CDC events, the primary payload is the change data itself, and the header tells you to which records the the change applies.



          This behavior is described in Change Event Header Fields:




          recordIds: One or more record IDs for the changed records. Typically, this field contains one record ID. But if the same change occurred in multiple records of the same object type during the same transaction, Salesforce groups the change notifications and sends one change event for all affected records. In this case, the recordIds field contains an array of record IDs for all records that have the same change








          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 12 at 0:08









          David ReedDavid Reed

          50.2k8 gold badges28 silver badges67 bronze badges




          50.2k8 gold badges28 silver badges67 bronze badges















          • Thank you. It took a comment from you for me to wrap my head around it.

            – Json Bourne Shell
            Aug 12 at 0:21

















          • Thank you. It took a comment from you for me to wrap my head around it.

            – Json Bourne Shell
            Aug 12 at 0:21
















          Thank you. It took a comment from you for me to wrap my head around it.

          – Json Bourne Shell
          Aug 12 at 0:21





          Thank you. It took a comment from you for me to wrap my head around it.

          – Json Bourne Shell
          Aug 12 at 0:21

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Salesforce Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f273178%2fchange-data-capture-update-events-in-bulk%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

          Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

          Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form