[SalesForce] Different user IDs across production and sandboxes – how to make them the same for every user

Normally users across production and sandboxes have the same unique user ID, given that you created the production user first, and then refreshed the sandbox.
We have the case that we created users first on sandbox, and afterwards created them in production (idea: first play/train in sandbox, then get productive in production environment).
Therefore a user has in production a different user ID than in the sandbox.

Is there any way to make them "equal", without having to refresh the sandbox?

Best Answer

Nope. You could add an external Id on the user record and then upsert if you're trying to load records. Or perhaps add a custom setting to store their Ids access multiple environments if you need to access that data through Apex.

Related Topic