function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ZhiliZhili 

Outbound messages with child records

Is it possible to include child records in outbound messages?

 

For example, Opportunity object has a parent-child relationship with OpportunityHistory. However, when I define the outbound message for Opportunity object, the OpportunityHistories field (relationship field) is not availble for me to pick as part of the outbound message. Another example is Account-Contact. Contacts field is not available for me to pick when defining outbound message on Account object.

 

Thanks

SuperfellSuperfell
no
TesterInSkyTesterInSky

Can this be done by using Apex Code or other features?

 

For example, an Apex class is triggered while a parent sObject has been updated, then in the Apex class, it query the related child sObjects then call an outbound message to send the data of those child sObjects out.

Message Edited by TesterInSky on 05-04-2009 09:03 PM
SuperfellSuperfell
You can't duplicate the reliable delivery aspects of OM from apex code. The reason OM supports sending a sessionId, is so that the listener can call back to the API to collect whatever additional data it might need.
ZhiliZhili

Simon,

 

Using the sessionID as a callback to fetch child records is a workaround. However, doing this increases unnecessary round trips to the server. Also, there is a delay between the time the listener receiving the parent record and the time after retrieving the child records which may cause data inconsistency.

 

I do think Salesforce.com should enhance the API to allow outbound messages with child records. I have posted an idea on idea exchange. Please let us know when Salesforce.com can address the enhancement request.

 

Thanks