Search code examples
salesforceapexsoql

Investigate References of Individual System Admin Users in Code and Config


How can we sweep through all code in our salesforce or and config in order to make inventory of where specific System Admin users are being referenced in code and config. This includes running scheduled batches in that specific user's name instead of generic one ? Any ideas? Thanks


Solution

  • My 7yr old answer might help: https://salesforce.stackexchange.com/q/24542/799

    What else... hard to say.

    1. Setup -> Process Automation Settings
    2. Setup -> Web-to-Lead Setup

    You could try deactivating this admin in sandbox and checking if any unit tests fail, any scheduled jobs (apex batch jobs/report snapshots/dashboard snapshots) die.

    The nasty bit is that this can be spread in Settings (series of objects that's rarely downloaded to Eclipse/SFDX/what have you) and scheduled jobs count as data, not config. So analysis of project on disk might not tell you much, especially if sneaky developer decided to reference sysadmins by email, username, alias, lastname, SSO Federation ID, being a member of certain group... And such reference could be in custom setting, custom metadata. Evil