Skip to main content
All CollectionsHelp ArticlesData Deployment
How to deploy Salesforce user records with Essentials Data Deploy
How to deploy Salesforce user records with Essentials Data Deploy

Yes, you can deploy Salesforce User object records with Data Deploy Essentials but there is some setup required to handle the ProfileID

David Belove avatar
Written by David Belove
Updated over a week ago

Yes, you can deploy Salesforce user records with the Essentials Plus add on for deploying relational data records called Data Deploy Essentials, but there is some setup required to handle the ProfileID.
​
If you try to deploy Salesforce user records with Data Deploy Essentials, you may encounter an error related to a missing ProfileId field that looks like this:
​

"Required field is missing - ProfileID"
​
This is a common issue when working with User object deployments. Let me explain why this happens and how you can address it:

1. ProfileId Requirement:

The ProfileId field is a required field for User records in Salesforce. It's not a custom field that you can see or directly modify, but it's a system field that links each user to their profile.

2. Why it's not visible:

ProfileId is not typically visible in the standard Salesforce interface or even in many API calls. Instead, you usually work with the Profile Name.

3. How to resolve this:

To successfully deploy User records with Copado Data Deploy, you need to include the ProfileId in your data template. Here's how you can do this:

a. In your data template for the User object, add a field for 'ProfileId'.

b. Instead of trying to populate this field directly, you'll need to use a lookup to the Profile object.

c. In your data template, include both the 'Profile.Name' and 'ProfileId' fields.

d. When populating your template, use the Profile Name in the 'Profile.Name' field. Copado Data Deploy will use this to look up the correct ProfileId in the target org.

4. External ID consideration:

Remember to use an External ID field for the User object to properly match records between orgs, as mentioned in the article "External IDs for Data Deploy" (http://docs.essentials.copado.com/en/articles/6613504-external-ids-for-data-deploy).

5. Other required fields:

Ensure all other required fields for the User object are included in your template and populated correctly.

6. Permissions:

Make sure the user executing the deployment has the necessary permissions to create/update user records and read profile information in both the source and target orgs.

If you continue to face issues, you might want to:

1. Double-check your data template structure.

2. Verify that all profiles referenced in your source data exist in the target org.

3. Consider using Copado's support resources or community forums for more specific assistance.

Remember, while it's possible to deploy User records this way, it's generally recommended to manage users directly in production for security reasons. Consider if this deployment is necessary or if there are alternative approaches that might better suit your needs and security requirements.

Did this answer your question?