Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 72839

A trigger is a feature of the Salesforce platform consisting of Apex code that executes before or after DML operations.

17 votes
1 answer
9k views

How do I change the running user of a platform event trigger handler?

You plan to use the Metadata API to configure your platform event trigger, not the Tooling API. This basically means that we will deploy the necessary changes through VS Code and Salesforce CLI. …
Nathanael Schmolze's user avatar
26 votes
Accepted

How do I change the running user of a platform event trigger handler?

Suspend and Resume Trigger Handler After deploying to an org, you may need to suspend and resume the trigger handler before the changes will take effect. … Note, resuming the trigger can take several minutes before the trigger begins processing events again. I hope this helps! …
Nathanael Schmolze's user avatar
0 votes
Accepted

Update child record based on parent external id

All right, so I have never myself inserted/updated by external id, but from what I've read, there are a few issues that could be causing your problem. First is a potential logic issue. As I'm reading …
Nathanael Schmolze's user avatar
0 votes
2 answers
678 views

Do setResumeCheckpoint commits revert after RetryableException?

According to the docs, setResumeCheckpoint starts processing events with a replay id after the last checkpoint, whereas RetryableException re-processes all events in the original trigger context (plus … My question then is, does RetryableException reprocess only the events after the last checkpoint, or does it revert everything that has been done in a trigger. …
Nathanael Schmolze's user avatar
2 votes
Accepted

Do setResumeCheckpoint commits revert after RetryableException?

I performed the following test, and found that RetryableException reverts everything committed through setResumeCheckpoint: // Test partial commit, then error. trigger testevent on Test_Event__e (after … EventBus.RetryableException('Testing how retrying after a commit works.'); System.debug('testevent [finished]'); } When publishing two events at one time, this re-processes both events in subsequent instances of the trigger
Nathanael Schmolze's user avatar
2 votes

How to clone trigger.newmap when passing into a trigger hanlder

If you're looking to clone the map itself, then the following should work for most needs: Map<Id, Account> = new Map<Id, Account>(Trigger.newmap); ... where Account is the specific type of the trigger
Nathanael Schmolze's user avatar
0 votes
Accepted

Update child record when parent record is created - possible w/ process builder?

/design/decision-guides/trigger-automation/ This tool has some drawbacks, in that it's still new, and doesn't support all of the features that process builder supports. … But for any new automation you build, I'd recommend trying to implement it through record-trigger flows first, then fall back to PB or workflow rules if you can't. …
Nathanael Schmolze's user avatar