3

In my Managed Package, I have a trigger for the Platform event Notification__e. The publish behavior is Publish Immediately.

When I publish an event via Workbench or Developer console in one of the subscriber orgs (where the package is installed) the trigger is not executing most of the time. In namespace-enable scratch org it is always working.

NOTE: How do I know that the trigger is not executing? Latest Processed Id is not changing on the Subscriptions related list after the publishing event. I checked after a considerably long time, taking asynchronous processing behavior of Platform event Triggers into account.

  • When you say "Latest Processed Id is not changing" you really mean it stays the same as it was before the triggering of the platform event? I only ask to discover if this is what you mean rather than "it doesn't change to the ID I got back when publishing" in case there is some other processing in your org that could cause other triggering of the platform event (so the ID may not match your expectation)? – Phil W Jan 3 at 12:02
  • @PhilW, Latest Processed Id is the same as it was before publishing platform event. – Sushant Srivastava Jan 3 at 12:05
  • 1
    I am not trying to match it with Salesforce Id returned in workbench @PhilW – Sushant Srivastava Jan 3 at 12:07
  • 1
    is trigger getting into error state? – Pranay Jaiswal Jan 3 at 14:09
  • Can you clarify what "not executing most of the time" looks like. Does the trigger fire occasionally? Only briefly after deployment? Only on Tuesdays? – Daniel Ballinger Jan 5 at 19:23

Your Answer

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

Browse other questions tagged or ask your own question.