Upon sandbox refresh, all the platform event triggers do not work - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Salman ZafarSalman Zafar 

Upon sandbox refresh, all the platform event triggers do not work

Apparently, we have to recompile them and then they work fine. Seems like an unknown "Known Issue" 
Rahma BelghoutiRahma Belghouti
Hi Salman,
Has your production been upgraded to winter 18 ?
and is your sandbox still in summer 17 ?
Salman ZafarSalman Zafar
We had this issue in three sandbox environments and all were in winter 18.
Michael TrezziMichael Trezzi
Hello, this is still an issue even in Spring 18. Whenever we refresh a sandbox, we need to manually recompile the trigger for it to start working. Can this be added to known issues and fixed?
Tad AalgaardTad Aalgaard
Same issue here in Spring 18.
Dirk SchlossmacherDirk Schlossmacher
Even worse for all Event Subscriptions for Triggers in Managed Packages:
  • If a sandbox is created/refreshed for a Production Org that has managed package installed, which contains packaged Platform Event Trigger, then the Platform Event subscriptions for such Trigger is also removed from the SB create/refresh.
  • But there is no workaround to re-create such Platform Event subscriptions, as managed package Triggers cannot be recompiled via edit & save, nor does "Compile all classes" recreate the subscriptions.
  • This is a severe bug with no workaround available!
  • Platform Events Developer Guide Version 42.0, Spring ’18 states: "Processes / Flows / Triggers provide an autosubscription mechanism...", but this autosubscription only works for newly created or recompiled Triggers/Flows, but cannot be initiated after SB refresh for packaged component subscriptions.
  • The current loss of subscriptions by default also isn't properly logged so cannot be post-processed in a standardized form after SB create/refresh for non-managed components.
  • Even a repeated install of the managed package (same version, of course as in production) doesn't cure the situation – as apparently the autosubscription mechanism doesn't fire again.
SF.com: Please help and fix ASAP!
John BrockJohn Brock
I appreciate your patience with this issue, and I would like to report that my team has checked in a fix to the Winter '19 release (as a patch), and this will hopefully resolve most of the subscription issues for sandbox copies. Please see the known issue : https://success.salesforce.com/issues_view?id=a1p3A000000FmO9QAK.