Use case:
PROD has a working Platform Event Foo__e
with corresponding subscriber trigger FooTrigger
as follows:
trigger FooTrigger on Foo__e (after insert) {
.. do work
}
When a new sandbox (cs50) is created from PROD (Winter 18), the trigger never executes when the Platform Event is published:
- Debug log for Automated Process never registers any entries
- Side effects of FooTrigger (subscriber to the Platform Event) never persisted
Why would this be?
Best Answer
Turns out that you have to actually go into the sandbox (just refreshed from PROD) and recompile the subscribing trigger for SFDC to recognize it as available to the Platform Event subsystem.
In a way, this is like the use case wherein Schedulable classes are not available in the Force.com UI Schedule Apex Classes unless you recompile that class and/or run test methods against thay class. (I've seen similar SFSE for invocable methods not appearing in Process Builder)