3

Given a hierarchical custom setting and a desire to include an entry for User = Automated Process, when I use the UI, I get this error:

enter image description here

4

The reason you might need to do this is that Platform Event subscribers run in the context of the Automated Process user. To enable the custom setting entry at the user level, you need to insert a row into the SObject using Developer Console, anonymous Apex, Data Loader, Workbench or the like.

  1. First, find the ID of the User record corresponding to the Automated Process user: SELECT Id, Name FROM User WHERE Name = 'Automated Process'
  2. Then insert a row as follows:

    SetupOwnerId = theIdOfTheAutomatedProcessUser
    Field1__c = ...
    Field2__c = ...
    

In the Developer Console, this might look like this:

enter image description here

Once you do this, the entry will appear in the Setup UI and you can edit or delete

enter image description here

  • Nice and simple. Could data load too for those so inclined. – Adrian Larson Apr 3 at 18:34

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.