Repository navigation
Fix #817: find the Automated Process user by username in LogFlowExecutionErrorEventHandler_Tests - #1040
Open
kacrouse wants to merge 1 commit into
Open
Fix #817: find the Automated Process user by username in LogFlowExecutionErrorEventHandler_Tests#1040kacrouse wants to merge 1 commit into
kacrouse wants to merge 1 commit into
Conversation
…ventHandler_Tests Fixes jongpie#817. Salesforce renamed the Automated Process user to "Platform Integration User" with alias "platint" in some orgs, and the user cannot be edited. The username is still autoproc@<org ID>, so the test now queries by username. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #817.
it_logs_when_enabledlooks up the Automated Process user byAlias = 'autoproc'. In some orgs, Salesforce renamed this user to "Platform Integration User" with aliasplatint. The user is read-only, so admins cannot change the alias back. The username is stillautoproc@<org ID>:UserType = 'AutomatedProcess'cannot replace the alias filter, because it returns 4 users in our org:autoproc@,automatedcase@,automatedclean@andslackbot@.Evidence
System.QueryException: List has no rows for assignment to SObjectin our production org and every sandbox. The Automated Process user there isautoproc@00d8y000001ziriuac, with aliasplatint.platint,LogFlowExecutionErrorEventHandler_Testspasses 2/2.config/scratch-orgs/base-scratch-def.json, all of./nebula-logger/deployed), all local tests pass: 1461/1461. There the user still has aliasautoproc, so the username lookup also works in orgs where the user was not renamed.Merge Danger
Door: two-way
Blast Radius: none
Test-only change in the Async Failure Additions plugin.
🤖 Generated with Claude Code