Skip to content

lekkimworld.com

Blog by Mikkel Flindt Heisterberg about everything and nothing – mostly appdev stuff…

About this blog

This is the blog for Mikkel Flindt Heisterberg about everything and nothing. More detailed info about me, incl. bio, can be found on the about me page. Please also read the disclaimer.

All views and opinions on this blog are definitely my own and does not necessarily reflect those of my employer.

I've been blogging for many years. See the archive for old posts.

Recent Posts

  • Migrated… Again.
  • Salesforce CLI TypeError with node v. 25.1.0
  • Amount of data required for testing Agentforce
  • Salesforce External Client App key and secret rotation via REST API
  • Only allow Bulk API for specific API users

Recent Comments

  1. Winter '26 Release Notes - Blog Martina Humpolce on Salesforce External Client App key and secret rotation via REST API
  2. Parth Savjadiya on Loving streams in node.js
  3. swamigalkodi on BYOLLM using Salesforce Einstein Open Connector API
  4. Lee Hildebrand on Scratch org with Salesforce Event Monitoring
  5. SMT on Minimum access to create/delete Salesforce scratch orgs

apex api composite_application connections discovering_notes8 domino eclipse expeditor heroku ibm ibm_connections java javascript java_explained lotus lotusphere2007 lotusphere2008 lotusphere2009 lotusphere2010 lotus_connections lsdoc mywidgets notes notes8 notes85 notes851 notes852 oauth ontime osgi plugin salesforce sametime sametime_75 sfdx Show-n-tellThursday sntt swt technote twitnotes twitter was websphere xml xpages

Tag: trigger

Run Apex trigger for Salesforce Platform Event as specified user

By default when you create an Apex trigger in Salesforce to trigger on a Platform Event it will run as the Automated Process system user. This can cause problems when you want to access data or use features that require a “real” user like Chatter. Starting with Spring 21 this has been made a lot better as you can specify the running user and maximum batch size among other things. It’s done through the PlatformEventSubscriberConfig metadata element (or through the Tooling API) and you can read more in the Spring 21 release notes.

The actual configuration is easy enough but I did find one caveat in that it didn’t take effect when deploying a PlatformEventSubscriberConfig record for an existing trigger i.e. a trigger already in the org. The metadata deployed just fine but it didn’t take effect. To fix it I had to delete the trigger from the org and the redeploy the trigger and the PlatformEventSubscriberConfig configuration at the same time.

YMMV.

Posted on October 28, 2021Tags apex, metadata, salesforce, triggerLeave a comment on Run Apex trigger for Salesforce Platform Event as specified user

Event-driven fine-grained auditing with Informix Dynamic Server

Via Google as a God-sent: Event-driven fine-grained auditing with Informix Dynamic Server

Posted on August 14, 2006Tags audit, informix, trigger
Proudly powered by WordPress