An 'Insufficient Privileges' error may occur when attempting to create or update a record for a standard or custom object in a Salesforce Partial Copy Sandbox after a sandbox refresh. This error occurs because automated processes (such as Apex Triggers) in the sandbox reference record IDs that exist in Production but were not copied during the partial sandbox refresh.
Steps to Reproduce (Example: Account Record)
This error occurs when an associated record that is normally populated by an automated process (such as an Apex Trigger) is not copied during the Salesforce sandbox copy process. The trigger references a static record ID that does not exist in the sandbox, causing a cross-reference access failure.
Example: An Apex Trigger populates a Contact Lookup with a static value (e.g., 003X00000XxXXXX). When an affected user creates a new record via the UI, Salesforce throws an Insufficient Privileges exception on Save because that Contact ID does not exist in the sandbox.
How to Confirm the Root Cause
Option 1 — Use API to Identify the Offending Record
A System Administrator or user with API access can attempt to create a record via API. This will return the specific cross-reference error identifying the record causing the exception.
If you then navigate to the Contact record via the UI, you will see: "Data Not Available — The data you were trying to access could not be found." This confirms a static value is being populated by an automated process.
Option 2 — Isolate via Apex Trigger Debugging
Disable the Apex Triggers associated with the object one by one until the error no longer occurs. Alternatively, enable Debug Logs for the affected user to identify which trigger is causing the exception. Once identified, you can modify or disable the trigger.
Resolution Steps
Is This Working as Designed?
Yes. Partial Copy Sandboxes do not copy all records from Production. See Records Copied When You Refresh a Partial Data Sandbox for details on what is and is not copied.
000384000

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.