Login

Salesforce Errors FAQ

Commonly asked questions about Salesforce errors

This document is a list of the most common Salesforce errors you may encounter and some options that may help resolve them.

NOTE: For Sandbox Seeding, the errors will need to be resolved in the seeding target org unless otherwise specified

What does CANNOT_EXECUTE_FLOW_TRIGGER or CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY mean?

Your Salesforce org has a trigger interfering with record creation or deletion.

Apex CPU time limit exceeded

Example: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: EmailMessageTrigger: System.LimitException: Apex CPU time limit exceeded

The Apex code in this trigger is taking too long to run on a record and failing with a System.LimitException error due to a SFDC platform time limit. The Salesforce platform enforces that Apex code from triggers must run within a short amount of time to prevent excessive resource consumption. Possible options to resolve this are:

  • Use the Disable automations option in the seeding job to disable the trigger for the duration of the seeding job (Sandbox Seeding only)
  • Modify the trigger to not run for the GRAX integration user
  • Optimize the trigger code to run in less time

General Trigger Execution

Example: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: TaskTrigger: execution of AfterInsert

The code in the trigger is blocking the operation based on how the object or related objects are currently configured. Possible options to resolve this are:

  • Add an override to the job to set the field value that will allow the record to pass the trigger validation rule
    (Sandbox Seeding or Restore)
  • Use the Disable automations option in the job to disable the trigger for the duration of the seeding job (Sandbox Seeding only)
  • Modify the trigger to not run for the GRAX integration user
  • Review the trigger code to allow the operation to succeed

What does DUPLICATE_VALUE or DUPLICATES_DETECTED mean?

Example: DUPLICATE_VALUE: A topic with the name, why-GRAX-is-amazing, already exists.

Salesforce requires unique values for certain fields (such as topic names) and GRAX has tried to insert a duplicate.

  • For Sandbox Seeding, this can happen when re-seeding a dataset without undoing the previous seed first. Undo the previous seed that included this record or select a different dataset to seed.
  • For Restore, this can happen if a record you are trying to restore was previously un-deleted from the Salesforce Recycle bin. To ensure data integrity and records are properly linked, always restore records from GRAX.

What does ENTITY_IS_DELETED mean?

Example: ENTITY_IS_DELETED: entity is deleted

The record was deleted in Salesforce since the last backup was taken. Wait for the next Auto Backup to complete and try the activity again.

What does FIELD_CUSTOM_VALIDATION_EXCEPTION mean?

Example: FIELD_CUSTOM_VALIDATION_EXCEPTION: Activity can't be created for Closed enquiry. Please Re Open Enquiry to save Activity.

The FIELD_CUSTOM_VALIDATION_EXCEPTION error indicates that there is a custom validation rule or trigger on the object that is blocking the record from being created. Review the message details to determine the cause, possible options to resolve this are:

  • Add an override to the seeding job to set the field value that will allow the record to pass the validation rule (Sandbox Seeding or Restore)
  • Use the Disable automations option in the seeding job to disable the trigger for the duration of the seeding job (Sandbox Seeding only)
  • Modify the validation rule / trigger to not run for the GRAX integration user
  • Skip the object

What does INACTIVE_OWNER_OR_USER mean?

Example: INACTIVE_OWNER_OR_USER: The specified user is inactive

The GRAX integration user does not have sufficient permissions to create the records for inactive users. Please review the permissions for the GRAX integration user / GRAX integration user permission set and ensure it has the Set Inactive Owners permission. See the Restore Best Practices page.

What does INSUFFICIENT_ACCESS_OR_READONLY mean?

Can't create a link for Email Message when it's not in draft state

Example: INSUFFICIENT_ACCESS_OR_READONLY: You can't create a link for Email Message when it's not in draft state (field=LinkedEntityId)

When a ContentDocumentLink attached to an EmailMessage is deleted, there are some guards that prevent us from placing it back. Salesforce only allows links to emails that are either in state draft, or created with IsClientManaged set to true.

If none of these apply, our recommended workaround is to archive the email message and then restore it using GRAX. In this process we're going to set that IsClientManaged flag, and then restore ContentDocumentLinks related to it.

Insufficient access rights on object id or record type

Example: INSUFFICIENT_ACCESS_OR_READONLY: insufficient access rights on object id or INSUFFICIENT_ACCESS_OR_READONLY: invalid record type

The GRAX integration user does not have sufficient permissions to delete / create this object or record type. Please review the permissions for the GRAX integration user / GRAX integration user permission set and ensure it has correct object and record type access.

Invalid sharing type

Example: INSUFFICIENT_ACCESS_OR_READONLY: Invalid sharing type V (field=ShareType)

You are trying to seed or restore a Content Document (ContentVersion + ContentDocumentLink) and you are getting an "Invalid sharing type V" error message. To resolve it, you need to configure file sharing to Set by Record in your Salesforce org settings:

  1. Go to Setup and enter Files in the Quick Find box.
  2. Under Salesforce Files, choose General Settings.
  3. Enable the Set by Record option for files attached to records.

Additional documentation is available from Salesforce.

Data Validation rules

There is a validation rule that is blocking the record from being created as it currently exists.

  • Review the message details to determine the cause and options to resolve by setting an override (such as setting the state field to Draft for the example above)
  • Skip the object.

Insufficient permissions

The GRAX integration user does not have sufficient permissions to create the record. Review the permissions for the GRAX integration user / GRAX integration user permission set and ensure it has access to create the records for that object

What does INVALID_CROSS_REFERENCE_KEY or INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY mean?

Example: INVALID_CROSS_REFERENCE_KEY: Missing reference: field TaskId ref ID: 00T46000008US01AAG

When Salesforce needs to do a many-to-many link between two objects (such as Accounts can have many tasks, task can be linked to many accounts), it uses a junction object called a cross-reference. This error means that the cross-reference GRAX is trying to create is missing or unable to access one side of the junction. This most commonly has two likely causes:

  1. Missing reference - One of the 2 records that are being linked is missing:
    • Check to see if there are other errors in the job that may indicate the record was skipped
    • The record was manually excluded
    • The record was not included in the job due to a filter such as max children
  2. this ID value isn't valid for the user or You do not have the level of access necessary - The GRAX integration user doesn't have sufficient permissions to create the cross-reference record type. Check the permissions for the GRAX integration user / GRAX integration user permission set and ensure it has access to create the cross-reference record type.

What does INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST mean?

Example: INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST: bad value for restricted picklist field: Direct_Traffic (field=originalSource)

The picklist value GRAX is trying to set is not a valid value for the field. This can happen if the option was deleted since the record was backed up or in Sandbox seeding if the option was added to the source org after the target org was created. Possible options to resolve this are:

  • Add the missing picklist value to the picklist options for the field
  • Add an override to the job to set the field value to a valid picklist option

What does STORAGE_LIMIT_EXCEEDED mean?

Example: STORAGE_LIMIT_EXCEEDED: storage limit exceeded

Your Salesforce target org does not have sufficient storage space to load the data you are trying to seed. GRAX provides an estimated size for all records vs the available space reported by the seeding target. Since these are estimates, its possible to exceed the available space when the data is actually loaded. Please edit the seeding job and reduce the amount of data being seeded, some options are:

  • Reduce file size by skipping the ContentDocument or Attachment objects
  • Skip objects that are not meaningful to the use cases for the seeded data. For example running a test on Opportunity data doesn't require EmailMessages
  • Clicking on the Object in the graph or list will show you the estimated size of the records for that object. You can use this to determine which objects are consuming the most space and use this info to decide which objects to skip

What does UNABLE_TO_LOCK_ROW mean?

Example: UNABLE_TO_LOCK_ROW: unable to obtain exclusive access to this record or 10 records: ...

Salesforce is attempting to update a separate record based on the changes to the record that reported this error while a different record in the same batch is also updating that record. This can happen as a result of a roll-up summary field or a trigger, such as rolling up the number of opportunities on an account. If you're seeing this error, it means the Salesforce and GRAX ROW LOCK resolution processes were unable to separate the child records that are blocking each other.

  • Review the trigger logic to ensure it can properly handle batches of records (and doesn't assume only one record will be updated at a time)
  • For Sandbox Seeding, reduce the number of records being seeded
  • For Restore, retry the restore job for the failed records

What does UNKNOWN_EXCEPTION mean?

UNKNOWN_EXCEPTION is a catch-all for errors that Salesforce does not provide a specific error code for. The error message usually has a general description of the cause of the error. Search the internet or contact Salesforce support to help identify the root cause. Based on the cause of the error, it may be possible to correct it by setting an override or skipping the object.