1

We are trying to update the contact owner of a new contact created via the customer community in the before trigger and receiving the following error.

insufficient access rights on cross-reference id

enter image description here

The same code works completely fine in the after trigger. The customer profile have read/write access to account and contact in the community sharing setting

enter image description here

  • Please edit your post to include the relevant code. Are you using a trigger handler pattern? Are you using with sharing or without sharing consistently? – David Cheng Dec 27 '19 at 15:27
  • @DavidCheng I tested the class with both with sharing and without sharing and it did not seem to impact the error. – Saumya Gaikwad Jan 10 at 9:44
0

If you need to update OwnerId of contact with the same user for all the records, you can configure it in Community Preferences instead of trigger.

Follow these steps:

  • Go to All Communities
  • Select the Community you are working on
  • Click on Administration
  • Select Preferences
  • Under Record Ownership, set a Default Owner
| improve this answer | |
0

After a lot of troubleshooting, we found out that the issue was with the community permission for users. Since the community user was not permitted to see other users, the trigger was unable to assign the case owner as the internal user(because before trigger checks all the permissions and FLS)

To resolve the issue, go to Setup > Sharing Setting and check the User visibility checkboxes.

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.