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
raj123raj123 

INSUFFICIENT_ACCESS_OR_READONLY, insufficient access rights on object id: []

Hi folks,

 

I need help to resolve this issue urgently. 

 

I am getting this error while saving  the case after updating some fields from application , 

 

i have given CRUD access to the case object and at the field level security i have made them as editable and they are visible to this custom profile.

 

i dont know why am i getting this error. 

 

Update failed. First exception on row 0 with id 500U0000003xOv7IAE; first error: INSUFFICIENT_ACCESS_OR_READONLY, insufficient access rights on object id: []
  
Please help me to resolve this.
 
 
Rajesh SriramuluRajesh Sriramulu

Hi

 

Goto Crud profile and edit the profile and see where it has a access to modify the case  object or not.

 

 

Hope this will helps u.

 

Regards,

Rajesh S.

SRKSRK

Ya it may be bocz of CURD

& also Check the owner the record if he is above u in role & OWR for the object is private then u need to do manuell shring or rite sharing rule

raj123raj123

i have created the sharing rule on case to share the records with particular record type with a group and have added the users to the group. 

 

can any one tell where am i doing mistake. as you said the Case is private 

SRKSRK

U r error is shwoing a record ID "500U0000003xOv7IAE" do u just try to open this Recod in salesfroce standard page
R u able to access it ??

vijaymindvijaymind

Are you sharing the records using apex code if so then you have access all but you do not have the permission to share the records ! I hope the script would be fail for some of the users not for all , so you can avoid this by setting try catch block ! For the user who do not have the permission to share the records once he will execute the script that would go to the catch block but there would be no unhandled exeception !

 

raj123raj123

@ vijay i am not doing sharing in apex code

SRKSRK

Are u able to access that record from salesfroce interface ???

raj123raj123

yes i am able to acess the record 

raj123raj123

Currently i have written class with sharing , and is in prod , not able to replicate same error in dev, 

 

does it help making it without sharing

SRKSRK

Class "without sharing" can acces any record it does not follow profile level security but then try to avoide using inputfields or standared method

SRKSRK

and also make clear that the user from which u r runing u r apex class must altest have read permission on that object