I have logging setup in my managed package using a platform-event published immediately with a trigger on that platform event which creates a Log__c record based on the data in the platform event.

This works perfectly well in scratch and developer edition orgs when the managed package is installed. However, when installed in an Enterprise Edition org, which is how we setup subscribers (OEM), the platform event is published but the trigger never runs. Additionally, I setup a flow to run on the platform event and insert a log object but this also never runs. Verified with debug logs setup on the Automated User and Running User. I did check the HourlyPublishedPlatformEvents entry in the limits api /services/data/v53.0/limits and this does get incremented when the platform event is published.

I then setup a generic platform event directly in the subscriber org & cloned the flow to run on that PE and this worked perfectly fine. I'm a bit at a loss of what could be the issue here, as this is only presenting in these types of orgs. Has anyone run into a similar problem or have a suspicion of what could be happening? The platform event is deployed and setup identically to the one I setup directly in the subscriber org

Platform Event Subscribers

1 Answer 1


I was facing the same problem with my Beta release. So I rechecked that the Namespace was mentioned at every level such as...

In the related .cmp I added the namespace to the 'channel' which is used by in the Controller.js for monitoring the Subscriber channel. Yours may look like this ...

<aura:attribute name="channel" type="String"  default="/event/cloudmj__Log_Event__e"/>

In the related Class which was 'sending' the Event I added the Namespace to both the Event Object and the Fields. Yours will look a bit like this...

String vYourEventValue = 'myGroovyEvent';
cloudmj__Log_Event__e  event = new cloudmj__Log_Event__e ();
event.cloudmj__DevName__c = DevName; 
event.cloudmj__ObjectName__c = MasterLabel;
event.cloudmj__YourEventField__c = vYourEventValue;

And I also noticed that in the related Controller.js the 'eventReceived' value ... JSON.stringify(eventReceived); ... had all the Fieldnames prefixed with the Namespace, Yours will look something like this...

{data:{schema:xxNzkWoTWu-qlKZ2iwpkpg,payload:{cloudmj__YourEventField__c:myGroovyEvent, .... },event:{replayId:22751715}},channel:/event/cloudmj__Log_Event__e}}

I dont use Triggers.

But now I use those Namespaces everywhere and it works for all my Events!


You must log in to answer this question.

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