function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
aam1raam1r 

Site Guest User cannot insert record

Hi, I hope someone can point me in the right direction here.

I'm facing an issue with a SIte Guest User unable to insert a record via VF pages and Controller.  I have tracked the issue down to an insert of a custom object record - in my case Booking__c.  Its quite a large class, which i'm not going to paste here.  

The Booking object has a lookup to Contact and Order objects and also a custom Event, with the latter being a M-D relationship.  I have checked the CRUD for thsi user's profile and it has View All and Modifiy all for Booking and Event and it has as much access as can be granted for Contacts and Orders (being Standard objects).  I have granted this user's Field-Level securty (accessibility) read and edit on each of teh above mentioned objects.

However, when i get to the of..
insert booking;
in my code, i get:
Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []
And i haven't a clue what coudl be wrong.  Coincidently, this issue suddenly arose in our sandbox last weekend when Spring 20 came about, however i was also developing at the time so its a stale-mate situation right now.

Any pointers would be great.

Thanks
Aamir

 
chaitanya kumar bansettichaitanya kumar bansetti
Hi aam1r,

DId you get chance to review the below article on the guest user updates.

https://help.salesforce.com/articleView?id=sf.networks_guest_policies_timelines.htm&type=5
https://help.salesforce.com/articleView?id=000352282&language=en_US&mode=1&type=1

Assigning new records created by guest users to a default owner in your org
  1. Guest users can’t be the owner for newly created records.
  2. Guest users can’t be given ownership of existing records.
  3. Ownership of records created by guest users must be transferred to a default owner, who is an active user in your org.
Hope this helps !!

Regards,
Chaitanya