---
schema_version: "1"
id: a279e6cfcee776da0f25766653d90993b57f8eecdfb0c90d6f5d30dfc9fab8f2
title: Maintaining User References
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_user_references.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_user_references.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: b56142626d85ad55a130249092871f9d30db761c0b04baf5d202d40efbd45b53
description: User fields are preserved during a metadata deployment.
---
# Maintaining User References

User fields are preserved during a metadata deployment.

When a component in your deployment refers to a specific user, such as a recipient of a workflow email notification or a dashboard running user, then Salesforce attempts to locate a matching user in the destination organization by comparing usernames during the deployment.

For example, when you copy data to a sandbox, the fields containing usernames from the production organization are altered to include the sandbox name. In a sandbox named test, the username user@acme.com becomes user@acme.com.test. When you deploy the metadata in the sandbox to another organization, the test in the username is ignored.

For user references in deployments, Salesforce performs the following sequence:

1. Salesforce compares usernames in the source environment to the destination environment and adapts the organization domain name.
2. If two or more usernames match, Salesforce lists the matching names and requests one of the users in the source environment be renamed.
3. If a username in the source environment doesn’t exist in the destination environment, Salesforce displays an error, and the deployment stops until the usernames are removed or resolved to users in the destination environment.