I'm trying to implement custom Apex Case Assignment Rules. The logic works fine, but when I test as a Customer in our Support Community, I get the standard error:
insufficient access rights on cross-reference id
No fields other than OwnerId are changing and it's in a Before Trigger. I've debugged and there are no exceptions thrown in running the logic (I've confirmed that the correct internal UserId is returned by the assignment class.
All classes involved are "without sharing" and the User object is "Public Read Only" in our external sharing model. The customers are CSPLitePortal licenses.
It appears that the initial Insert save to the database is failing but I don't know why. The community user can open/view the internal user record, so it's not intuitively a record access issue... (I tested by disabling the trigger, creating the case, then transferring to the internal user + comment in the feed, then having the community user click on the User record from within the Case feed)
EDIT: I decided to set up a Test class to try runAs() with the community user. Creating and inserting the Case works just fine, no exceptions, and the owner is the correct internal user. Yet still, submitting from the Community fails.
No Answers Yet