I am trying to use the updateRecord() lightning/uiRecordApi function to update fields on a record in the system as a Guest User. From consoling out the res, I am getting an error of "An error occurred while trying to update the record. Please try again." with status code 403.

Will I have to create my own updateRecord() controller with "without sharing" to get around this 403 forbidden? I am assuming that the standard updateRecord() from Salesforce has sharing settings enforced so no Guest User can update records.

  • That's not sharing access, that's object and field level access - and the guest user has at most read-only access. Commented May 11, 2021 at 21:53
  • It's kind of a pain, esp when doing things like getting access to records that will help the Guest User become a paid user. I generally use a platform event driven strategy to get around this. (fire and handle the event to escape context) Commented May 11, 2021 at 21:55
  • Here: I've detailed it in this answer: salesforce.stackexchange.com/a/337660/550 Commented May 11, 2021 at 21:58
  • Yeah I double checked objects/field level access for this Guest User profile and it has Read/Create on the object and read/edit access on all of the applicable fields on the object. Commented May 12, 2021 at 0:34
  • The Guest User profile cannot have create on any object. Is this some sort of custom guest user profile? Commented May 12, 2021 at 0:48


You must log in to answer this question.

Browse other questions tagged .