1

One of the limits of PushTopic query is not being able to have relationships in the soql. I'm wondering if there is any solution to this or any alternative to PushTopic.

I'm looking for a solution similar to what PushTopic provides meaning receiving notifications for changes to Salesforce data (create, update, delete). However, I have to have relationships in my query since I need to traverse between three objects (master-detail/lookup) to fetch information.

1 Answer 1

2

Your options:

  1. Create a custom "shadow" object that "collects" and "flattens" a subset (or all..) fields from your target objects, then use the shadow object as a PushTopic source. The "collect" operation can be implemented via a variety of means, a trigger being the most common. "Flatten" here refers to traversal of a relationship and extraction of relevant fields.

  2. Use Platform Events (tutorial). Similar to a PushTopic, a platform event is a type of streaming event. You would have to write code to create the event, populate the fields on the event and publish (fire) it. To initiate this sequence, you'll have to have a process that "listens" for changes on your target objects, a trigger could be used for this.

Take a look at Integration Patterns for a high-level overview of other integration options.

You must log in to answer this question.

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