INACTIVE_OWNER_OR_USER: operation performed with inactive User
You set a record's Owner (or another User reference) to a deactivated user. Salesforce blocks new ownership pointing at inactive users by default. Either reassign to an active user, reactivate the user, or enable the org setting that allows assignment to inactive users.
Also seen asINACTIVE_OWNER_OR_USER·operation performed with inactive User·INACTIVE_OWNER_OR_USER: operation
By default, Salesforce refuses to let you set a record's owner (or any user lookup) to a deactivated user. The reasoning is straightforward: the inactive user can't act on the record, can't be notified, can't approve workflows.
What triggers it
Account a = new Account(Name = 'Test', OwnerId = formerEmployeeId);
insert a; // INACTIVE_OWNER_OR_USER
Or:
Case c = [SELECT Id FROM Case WHERE Id = :caseId];
c.OwnerId = formerEmployeeId;
update c; // INACTIVE_OWNER_OR_USER
Fix 1: reassign to a queue or active user
Most-active-user fix: query the user's role/team, find an active substitute, assign there.
List<User> backups = [
SELECT Id FROM User
WHERE Profile.Name = 'Sales User'
AND IsActive = true
AND UserRoleId = :originalUser.UserRoleId
LIMIT 1
];
if (!backups.isEmpty()) {
a.OwnerId = backups[0].Id;
}
For systematic re-ownership during deactivation, use a mass-transfer workflow: when a user is being deactivated, run a script to transfer their records to their manager (or a queue) before flipping the IsActive bit.
Fix 2: reactivate the user
If the deactivation was accidental:
Setup → Users → click the user → uncheck Active to reactivate.
Note: reactivating uses a license seat. If your org is at its license cap, you can't reactivate without freeing a seat elsewhere.
Fix 3: enable the org setting
Setup → Customize → Activities → Activity Settings (and similar pages for other features) sometimes have a checkbox: "Allow inactive User to be assigned as Owner of [object]." Toggle on, and the platform stops throwing this error for that specific object's ownership.
But: most teams want this validation. Disabling it lets ownership rot over time as users come and go.
Fix 4: disable the validation entirely
Org-wide, you can disable the check via Setup → User Management Settings → "Allow Inactive Users to Reference" (the exact name varies by Salesforce version). This is org-wide and applies to all objects.
Don't do this. The validation is one of the cheap defences against ownership rot.
A subtle case: lookup fields that aren't Owner
The error fires for any User lookup, not just OwnerId. If you have a custom Account_Manager__c lookup to User and try to set it to a deactivated user, you get this error. The same fixes apply.
Different from "user can't see the record"
Don't confuse this with INSUFFICIENT_ACCESS_OR_READONLY. That fires when an active user lacks access. INACTIVE_OWNER_OR_USER fires specifically because the user is deactivated, regardless of their permissions when they were active.
