• Griffin Homan
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
The error "INACTIVE_OWNER_OR_USER, Record owner cannot be an inactive user" is being thrown in my flow, when it tries to create a new opportunity using an inactive users ID as the ownerId, via an apex action.

The desired outcome is to allow the inactive user to become the owner of the opportunity record. I followed the below article to enable setting "Update Records with Inactive Owners".
https://help.salesforce.com/articleView?id=000334139&type=1&mode=1

With this setting enabled, I created a permission set and included "Update Records with Inactive Owners" in it, then assigned it to my user. I am now able to manually insert an opportunity with the ownerId set to an inactive user, without error.

In my flow, I'm using a custom apex action to convert a lead to an account/contact/opportunity. When debugging the flow and using the inactive user, it fails with the error "INACTIVE_OWNER_OR_USER, Record owner cannot be an inactive user".

I don't understand why I'm able to insert an opportunity with an inactive user as the opportunity owner manually, but not though an apex action.
  • December 07, 2020
  • Like
  • 0