You are here:
Common Errors and Warnings - Seeding and Anonymize for Salesforce
Check out common errors and warnings you might encounter while using Seeding and Anonymize in Salesforce. For each issue, we offer a clear explanation of the cause and actionable steps you can take to resolve it.
Error Message: INVALID_CROSS_REFERENCE_KEY
Reason 1: INVALID_CROSS_REFERENCE_KEY: Record Type ID: This ID value is not valid for the user. The authenticated user does not have the correct permission to the Record Type.
Solution: Verify the authenticated user has the correct permission to the Record Type provided in the error.
Reason 2: INVALID_CROSS_REFERENCE_KEY: invalid cross-reference id: The Parent record isn't included in the seeding job or permission issue(s) on the parent object or a lookup relationship isn't included in the seeding job.
Solution: Verify the parent object is included in the seeding job. Review the authenticated user has access to the parent record that is referenced within the error. If it is a lookup relationship ensure the parent object is included in the seeding job.
Error Message: ENTITY_IS_DELETED
Reason: This error occurs in Salesforce when at least one record references a deleted record in the destination org.
Solution 1: Check that the record doesn't reference a deleted record (could also be the record’s parent) in the destination org.
Solution 2: If you manually deleted data to the sandbox since the last seeding job, Own may not be aware of these changes. For Own to know what records exist in the selected sandbox, you need to run a reindexing process by clicking Seed in the Template Builder, and following the steps in the Seed dialog. You can select to index the template objects (recommended), or all the destination objects. Indexing all destination objects increases the duration of the seeding job.
Error Message: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY
Reason: Occurs when an object has a trigger and data being updated or created causes the trigger to run and error out. More specifically, it is called an Unhandled Exception.
Solution:
- Change the Apex code to handle exceptions
- Disabling the trigger (you need to reach out to the vendor if the trigger is part of a managed package
- Exclude the records that are causing the trigger to run
Error Message: CANNOT_UPDATE_CONVERTED_LEAD
Reason: Salesforce does not allow updating data of a converted lead.
Solution: Use the filter: “converted” EQUAL TO “No” to exclude converted leads from the seeding template.
Error Message: INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST:Status: bad value for restricted picklist field
Reason 1: Destination org doesn't have the value enabled that is selected in the source environment. This can be a common error as environments evolve over time and may change the possible pick-list values that are available to be selected upon record creation.
Solution: If the object(s) have multiple record types enabled in the source environment, then the value for the record type in the destination environment must be also be enabled.
If the object doesn't have a record type enabled then the pick-list value for the object in the destination environment should be enabled.
Reason 2: The source org dataset no longer contains an active picklist value. This prevents you from successfully restoring and seeding data. Please clean the data and update the value to a current active value.
Solution: Go to Setup, <Object>, Fields and Relationships, Select the PL Field, and view the inactive values.
Error Message: INACTIVE_OWNER_OR_USER
Reason: The owner of the record in the source environment is disabled in the destination environment.
Solution 1: Enable the “Set Audit Fields and Update Records with Inactive Owners” Permission. Once this setting has been enabled, create a permission set or edit the profile of the authenticated user and give them the 'Update Records with Inactive Owners' permission. You can read about 'Update Records with Inactive Owners' permission in Salesforce help to enable this permission.
Solution 2: Activate the record owner in the destination environment.
Error Message: DUPLICATES_DETECTED” or “DUPLICATE_VALUE: duplicate value found
Reason: Salesforce found a matching value in a unique identifier field when inserting/updating a record.
Solution 1: Delete the duplicate records in the destination.
Solution 2: Disable duplicate rules in your Salesforce organization.
Solution 3: If this is a Partial Sandbox that contains records that we inserted via Salesforce refresh, you need to run a reindexing process by clicking Seed in the Template Builder, and following the steps in the Seed dialog. This allows Own to know what records exist in the selected sandbox. You can select to index the template objects (recommended), or all the destination objects. Indexing all destination objects increases the duration of the seeding job.
Error Message: FIELD_CUSTOM_VALIDATION_EXCEPTION:
Reason: If all automations weren't disabled before the seeding job was started, records being seeded don’t meet the requirements of the active automation(s) to allow seeding.
Solution 1: Temporarily disable automations before the job begins. Once the job completes, re-enable the automations.
Solution 2: Modify the template or dataset of records included in the seeding job that meets the requirements of the active automations.
Solution 3: Update the source records to meet the requirement of the automations.
Error Message: FAILED_ACTIVATION
Reason: Failed to activate/re-enable automations on the Order object.
Check for permissions to manage and change flows.
Unable to change Apex triggers.
Solution: Confirm these permissions are assigned to the integration user:
- Author Apex
- Customize Application
- Manage Flow
Error Message: FIELD_INTEGRITY_EXCEPTION
Reason: Attempt to insert the wrong object ID in the destination record’s lookup field.
Solution: Validate the object ID being inserted in the destination org record’s lookup field.
Error Message: SKIP_INSERT
Reason: A record can't be inserted because of a dependency that hasn't been met but is required. For example, a lookup to a parent that doesn't exist.
Solution: Check for the data inclusion of the parent record.
Error Message: STRING_TOO_LONG
Reason: Field Exceeds Field Size Limit.
Solution: Review the data in the source org and/or update the field size limit.
Error Message: INVALID_FIELD_FOR_INSERT_UPDATE
Reason: Trying to anonymize Person Account while the anonymization template contains replacement value for the Name field that is not editable.
Solution: To anonymize Person Accounts, set replacement values for FirstName and LastName while skipping the Name field.
Error Message: INVALID_FIELD: Failed to deserialize at col number
Reason: A file is missing from the backup, therefore Own could not restore it during the job.
Solution: Check whether all files/attachments were backed up in the source backup.
Error Message: SF_BATCH_FAILED: adding synthetic line to results file
Reason: A record included in the Bulk restore failed to be inserted in the destination environment.
Solution: Review the resulting log file for more information on the error.

