0

I am exposing a service using a site but facing some issues with the guest user access for object records. While inserting a record, I am getting 'insufficient access rights on cross-reference id' error. I am using master-detail relationships between objects. I checked all the permissions, sharing settings added to the guest user.

I have created a sharing rule on the parent object to provide read access to the guest user but after providing access also, I am getting the cross-reference entity error. I am getting this issue after the winter'21 release. In Winter'21, the 'Secure guest user record access' setting is by default enabled & can't be changed. I think, this is the issue of the error but I have no idea what I am missing to share records with the guest user.

Note:- I can't change the sharing setting in the Apex class.

0

The limitations imposed on the Guest user turned it into a license that is not suitable for this kind of thing.

If you need to expose a service, I think it would be better for you to expose an API through another cloud, such as Heroku, and use an integration user for those.

The good thing is that by creating a proxy you can make some validations before actually calling Salesforce. This is great to avoid unnecessary calls that cause errors when running the service.

If you need an example on how to integrate a Heroku app that acts as a proxy, you can visit this repository of mine where I do exactly this thing (exposing an endpoint of a Python app that calls Salesforce using a specific user's credential using OAuth 2.0).

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.