4

At what place in the Order of Execution does the query used in a Streaming API Push Topic run and push the outbound record?

This may matter if you are seeking to include field values in either the Select or the Where clause that result from changes due to Workflow Rules or Apex Changes. It seems like the PushTopic query would fire near the end of the Order so that you a record that did not previously apply could be returned in the query after such a change.

2

Sometime after step 20 on the guide you mentioned; this changes from time to time, but it is always the final step, after all workflow rules, roll up summaries, and so on have occurred. It can only occur after everything has completely committed to the database, otherwise the Streaming API would see data that could potentially be rolled back. The filter criteria must match the record's final state after all changes have been applied to it.

  • What I don't know, though, is if an immediately triggered future method can delay or possibly even prevent the push topic from happening (e.g. by editing the record immediately after the final commit). I'll experiment, but if anyone wants to update or comment here, please feel free. – sfdcfox Jul 16 '15 at 16:07
  • I agree that it must happen on commit and would probably happen regardless of the immediate future method since the initial transaction ended with a commit. – AlwaysThinkin Jul 16 '15 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.