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
Alexander Pinate 18Alexander Pinate 18 

INSUFFICIENT_ACCESS_OR_READONLY: insufficient access rights on object id.

Hi Team,

I am getting this error in the this flow:

Flow Details
Flow Name: Update_Meeting
Type: Screen Flow
Version: 59
Status: Active
Org: Peninsula Employment Services Limited (00D0t0000000VPq)
Flow Interview Details
Interview Label: Update Meeting 06/11/2018 1:31 PM
Current User: Ciaran Adams (0056A000001JpYy)
Start time: 06/11/2018 1:31 PM
Duration: 5 seconds
How the Interview Started
Ciaran Adams (0056A000001JpYy) started the flow interview.
Some of this flow's variables were set when the interview started.
EventID = 00U0t000002gb8dEAA
FAST LOOKUP: Find_Event
Find all Event records where:
Id Equals {!EventID} (00U0t000002gb8dEAA)
Assign those records to {!Event}.
Save these field values in the variable: WhoId, Meeting_Status__c, WhatId, OwnerId, ActivityDate, ActivityDateTime, StartDateTime, CreatedDate, Meeting_Type__c, Booking_Lead_Source__c, Booking_Follow_Up_Stage__c, Lead__c
Result
Successfully found records.
SCREEN: Screen_Update_Status
Display Text: CurrentStatus
Value at run time:
The current meeting status is: Booked


Dropdown List: Select_Meeting_Status
Label:
Meeting Result

Data Type: Text
Choices selected at runtime:
Choice selected at runtime: Cancelled (Choice_Status)
Value of choice: Cancelled


Selected Navigation Button: NEXT
DECISION: Is_Booked
Skipped this outcome because its conditions weren't met: Booked
Outcome conditions:
{!Select_Meeting_Status} (Cancelled) Equals Booked

Executed the default outcome
RECORD QUERY: Find_Lead
Find one Lead record where:
Id Equals {!Event.WhoId} (0030t00000l62PXAAY)
Result
Failed to find record.
DECISION: Is_Last_BST_Null
Skipped this outcome because its conditions weren't met: LastBST_not_Null
Outcome conditions:
{!LastBSTID} (null) Is null false

Executed the default outcome
RECORD QUERY: Get_Last_Event_BST
Find one Event record where:
Id Equals {!EventID} (00U0t000002gb8dEAA)
Result
Successfully found record.
{!LastBSTID} = 0056A000001KzrsQAC
FAST LOOKUP: Get_BST
Find all User records where:
Id Equals {!LastBSTID} (0056A000001KzrsQAC)
Assign those records to {!BST}.
Save these field values in the variable: IsActive
Result
Successfully found records.
DECISION: Is_BST_Active
Executed this outcome: BST_is_Active
Outcome conditions:
{!BST.IsActive} (true) Equals true
SCREEN: Screen_Meeting_Outcome
Dropdown List: Select_Meeting_Outcome
Label:
Meeting Outcome

Data Type: Text
Choices selected at runtime:
Choice selected at runtime: BDM was running late, prospect couldn't meet later. (DependentPicklist_Outcome)
Value of choice: Can_BDMC_Running_late
Field assignments:
{!TempID} = Dependent_Field_Value__c (Can_BDMC_Running_late)


Selected Navigation Button: NEXT
RECORD UPDATE: Update_Event_Not_Booked
Find all Event records where:
Id Equals {!EventID} (00U0t000002gb8dEAA)
Update the records’ field values.
Meeting_Outcome_Details__c = {!Select_Meeting_Outcome} (BDM was running late, prospect couldn't meet later.)
Meeting_Status__c = {!Select_Meeting_Status} (Cancelled)
Result
All records that meet the filter criteria are ready to be updated when the next Screen or Wait element is executed or when the interview finishes.
DECISION: Was_Cancelled
Executed this outcome: Cancelled
Outcome conditions:
1. {!Select_Meeting_Status} (Cancelled) Equals Not_Shown
2. {!Select_Meeting_Status} (Cancelled) Equals Cancelled
Logic: One condition must be true (OR)
RECORD CREATE: Create_Cancelled_Meeting_Task
Create one Task record where:
ActivityDate = {!$Flow.CurrentDate} (November 6, 2018)
Booked_For__c = {!Event.OwnerId} (0056A000001J2WlQAK)
Booked_On__c = {!Event.CreatedDate} (06/11/2018 12:58 PM)
Booking_Date__c = {!Event.StartDateTime} (06/11/2018 1:00 PM)
Booking_Follow_Up_Stage__c = {!Event.Booking_Follow_Up_Stage__c} (null)
Booking_Lead_Source__c = {!Event.Booking_Lead_Source__c} (null)
Lead__c = {!Event.Lead__c} (null)
Meeting_Outcome_Details__c = {!Select_Meeting_Outcome} (BDM was running late, prospect couldn't meet later.)
Meeting_Status__c = {!Select_Meeting_Status} (Cancelled)
Meeting_Type__c = {!Event.Meeting_Type__c} (Prospect - Follow Up)
OwnerId = {!LastBSTID} (0056A000001KzrsQAC)
Priority = High
RecordTypeId = 0126A000000t4pFQAQ
Status = Open
Subject = Cancelled Meeting - {!LeadCompany} (Cancelled Meeting - )
WhatId = {!Event.WhatId} (0060t00000DiBskAAF)
WhoId = {!Event.WhoId} (0030t00000l62PXAAY)
Result
A record is ready to be created when the next Screen or Wait element is executed or when the interview finishes.
{!TaskID} = 00T0t00000AJLjyEAH
RECORD UPDATE: Update_BDM_Cancelled_Date
Find all Lead records where:
Id Equals {!LeadId} (null)
Update the records’ field values.
BDM_Cancelled_from_Client__c = {!Event.StartDateTime} (06/11/2018 1:00 PM)
Result
All records that meet the filter criteria are ready to be updated when the next Screen or Wait element is executed or when the interview finishes.
RECORD UPDATE: Mark_For_Deletion
Find all Event records where:
Id Equals {!EventID} (00U0t000002gb8dEAA)
Update the records’ field values.
Subject = Delete: {!LeadCompany} (Delete: )
Result
All records that meet the filter criteria are ready to be updated when the next Screen or Wait element is executed or when the interview finishes.
RECORD DELETE: Delete_Event
Delete all Event records where:
Id Equals {!EventID} (00U0t000002gb8dEAA)
Result
Failed to delete records that meet the filter criteria.

Error Occurred: The flow tried to delete these records: null. This error occurred: INSUFFICIENT_ACCESS_OR_READONLY: insufficient access rights on object id. You can look up ExceptionCode values in the SOAP API Developer Guide (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_concepts_core_data_objects.htm).

I am not getting this error as a Salesforce Admin but other users are getting them and I am wondering where is the permission or sharing rule that is missing in this puzzle. Any recommendation where should I look?

Thanks, 
Best Answer chosen by Alexander Pinate 18
SandhyaSandhya (Salesforce Developers) 
Hi,

We will face "INSUFFICIENT_ACCESS_OR_READONLY, insufficient access rights on object id" because of Sharing Settings.

To overcome this issue, check the below

1. OWD, Sharing Rules and Role Hierarchy of the object in which you are trying to update the record.

2. Owner of the record which you are trying to update.

3. Check the trigger logic and check OWD, Sharing Rules and Role Hierarchy of the related objects records which are getting updated.

Note:
Even though trigger runs in System Mode, Sharing Settings will be checked. Only CRUD and FLS will not be checked against the user.

   Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
                                             
Best Regards
Sandhya