Skip to main content

Data Deploy Issues and Resolutions

The most commonly encountered issues when deploying data and their proposed resolutions.

Garrett Meeks avatar
Written by Garrett Meeks
Updated over 10 months ago

When dealing with Data Deploy in Copado, several common issues can arise. Here are the 20 most frequent problems encountered and their respective solutions:

  1. Duplicate Records

    • Issue: Duplicate records are created during data deployment.

    • Resolution: Implement External IDs to uniquely identify records and prevent duplicates. Configure External ID fields on relevant objects in both source and target environments. This setup allows Copado to match records based on these IDs rather than creating duplicates. Ensure that the data import process respects these IDs by using upsert operations instead of insert.

  2. ClientInputError: Server Error Returned in Unknown Format

    • Issue: An unspecified Salesforce API (Application Programing Interface) error occurs, which can halt the deployment process.

    • Resolution: Retry the deployment. If the error persists, review the API usage and error logs for more specific error messages. Engage Copado support if necessary. Ensure that your API versions are compatible and that the payload format adheres to the expected schema.

  3. Field Integrity Exceptions

    • Issue: Errors due to field values not meeting the integrity constraints in the target environment.

    • Resolution: Validate all field values against the target environment's constraints before deployment. Use data validation scripts or tools to identify and correct integrity issues. Adjust validation rules or field formats in Salesforce as needed to accommodate the data.

  4. Missing Required Fields

    • Issue: Essential fields in the target environment are not populated during deployment, leading to errors.

    • Resolution: Update the data templates to ensure all required fields are included and populated. Use data quality tools to check for completeness and accuracy before deployment. Automate these checks to run pre-deployment to catch any issues early.

  5. ExceededQuota: ApiBatchItems Limit Exceeded

    • Issue: The deployment exceeds Salesforce API limits, particularly the batch item limits.

    • Resolution: Optimize the size of your deployment batches. Consider using bulk API if not already doing so, as it allows larger batches and is optimized for large data volumes. Monitor API usage closely and adjust your deployment strategy based on the limits.

  6. Invalid Cross Reference ID

    • Issue: Record references (like lookup or master-detail relationships) fail because the referenced IDs do not exist in the target environment.

    • Resolution: Ensure that all dependent records are included in the deployment package. Use a staging area to reconcile IDs and relationships before the final deployment. Implement robust error handling to catch and report unresolved references.

  7. FIELD_CUSTOM_VALIDATION_EXCEPTION

    • Issue: Custom validation rules in the target environment block the record insertion or updates.

    • Resolution: Review the validation rules that are triggering the exceptions. Consider temporarily disabling these rules during the data load process or adjust your data to comply with the rules. Re-enable the rules post-deployment and perform a full data validation.

  8. Data Deployment Error: DUPLICATES_DETECTED

    • Issue: Salesforce's duplicate management rules identify the incoming records as duplicates.

    • Resolution: Analyze and adjust the duplicate rules and matching criteria in Salesforce. Perform a pre-deployment data cleansing to remove duplicates. Use tools like data loaders with matching capabilities to prevent duplicates during the deployment.

  9. Data Deployment Error: FIELD_FILTER_VALIDATION_EXCEPTION

    • Issue: Data fails to meet the filter criteria for certain fields in the target environment.

    • Resolution: Adjust the data to meet all field filter criteria or modify the filter settings in Salesforce to be less restrictive during the deployment. Post-deployment, revert the filter criteria to its original strictness to maintain data integrity.

  10. Data Deployment Error: REQUIRED_FIELD_MISSING

    • Issue: Data deployment fails because some fields marked as required in the target environment are missing in the deployment data.

    • Resolution: Use data mapping tools to ensure all required fields are mapped and populated correctly from source to target. Validate the dataset for completeness before initiating the deployment.

  11. Data Deployment Error: INVALID_FIELD_FOR_INSERT_UPDATE

    • Issue: Attempt to insert or update fields that are read-only or not writable in the target environment.

    • Resolution: Identify and remove or modify any fields in your data template that are read-only or formula fields in the target environment. Ensure that your data mapping aligns with the writable fields available in the target schema.

  12. Data Deployment Error: INVALID_EMAIL_ADDRESS

    • Issue: Email fields contain values that do not conform to the standard email format.

    • Resolution: Implement a data validation step to check and correct email formats before deployment. Use regular expressions to validate email patterns and cleanse data accordingly.

  13. Data Deployment Error: INVALID_PHONE_NUMBER

    • Issue: Phone number fields contain values that are not in a valid format.

    • Resolution: Standardize phone numbers to a consistent format that matches the target environment's requirements. Use data transformation tools to format phone numbers during the data preparation phase.

  14. Data Deployment Error: STRING_TOO_LONG

    • Issue: Text fields contain values exceeding the maximum length allowed in the target environment.

    • Resolution: Truncate text fields in the source data to meet the maximum length requirements of the target environment. Implement data quality checks to automatically detect and correct length issues before deployment.

  15. Data Deployment Error: MALFORMED_ID

    • Issue: Salesforce record IDs provided in the data are incorrectly formatted.

    • Resolution: Validate Salesforce IDs in the source data to ensure they are correctly formatted. Use scripts or tools to detect and correct malformed IDs prior to deployment.

  16. Data Deployment Error: SHARE_NEEDED_FOR_CHILD_OWNER

    • Issue: Ownership issues for records that require sharing settings to be explicitly defined.

    • Resolution: Review and adjust the ownership and sharing settings for records that require explicit sharing settings. Ensure that all records have appropriate ownership assigned and that sharing rules are correctly configured.

  17. Data Deployment Error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY

    • Issue: A trigger or process builder prevents the insertion, update, or activation of records.

    • Resolution: Identify the triggers or process builders that are causing the issue. Temporarily disable these automations during the deployment or adjust their logic to allow for the deployment data. Re-enable and test post-deployment.

  18. Data Deployment Error: MIXED_DML_OPERATION

    • Issue: DML operations on setup and non-setup objects are being mixed in the same transaction.

    • Resolution: Separate the DML (Data Manipulation Language) operations on setup and non-setup objects into different transactions. Use asynchronous processing like future methods or batch Apex to handle setup object manipulations.

  19. Data Deployment Error: ENTITY_IS_DELETED

    • Issue: Attempting to deploy records that have been deleted in the source environment.

    • Resolution: Cleanse the source data to remove references to deleted records. Use data validation tools to ensure all records in the deployment set are active and available.

  20. Data Deployment Error: OPERATION_TOO_LARGE

    • Issue: The deployment operation is too large for Salesforce to process in a single transaction.

    • Resolution: Break the deployment into smaller, more manageable transactions. Use batch processing and optimize the data load to reduce the transaction size and complexity.

Each of these issues requires careful planning, configuration, and testing to ensure successful data deployments. Utilize sandbox environments to simulate deployments and catch these issues early. Always refer to the latest Copado documentation and best practices to guide your deployment strategies effectively, or reach out to Copado support through the in-app chat.

Did this answer your question?