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 

Not able to insert data in AccountShare object

I know this question is a straight forward but still if anybody has any clue then please let us know.
We are trying to insert data in AccountShare table and are facing problem. While trying to insert data in AccountAccessLevel field, API is throwing the following error message:

Message: Account Access: bad value for restricted picklist field: Read Only\nStatus Code:INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST\nFields: System.String[]\nID: \n\n


We are trying to insert value which reads as "Read Only" without double quotes.


We checked the field properties and found that it is restricted picklist and filterable. Is there any way we can insert data in this field or leave it blank.


Thanks in advance.




The values for that picklist is "Read". "Read Only" is the label.  You need to specify the value, not the label
I am getting the following error when trying to load data to the AccountShare table.  I am loading the correct values...why would it be resulting in an error???

Message Code

: WRT_8164


: Error loading into target [AccountShare] : Error received from Fields [AccountAccessLevel, OpportunityAccessLevel, CaseAccessLevel]. Status code [INVALID_ACCESS_LEVEL]. Message [: AccountAccessLevel, OpportunityAccessLevel, CaseAccessLevel (Account, Opportunity, Case Levels, Con Levels (Edit, Read, None, Edit) are below organization levels (None, None, None, ControlledByParent))].

Message Code

: CMN_1053


: : Rowdata: ( RowType=1(update) Src Rowid=1 Targ Rowid=1

Id (Id:Char.18:): "00r5000000yNeaEAAS"

AccountAccessLevel (AccountAccessLevel:Char.40:): "Edit"

OpportunityAccessLevel (OpportunityAccessLevel:Char.40:): "Read"

CaseAccessLevel (CaseAccessLevel:Char.40:): "None"


Vijay RautVijay Raut



Have you got any workaround / root cause for this problem? I am also getting same error and looking for workaround.


Thanks in advance.


It's working with value "manual"



CaseShare testcaseshare = new CaseShare(UserOrGroupId = curuserID,CaseId =,CaseAccessLevel = 'manual');





Sorry, it isn't working at all. All my test where coverd, but when I tried it again, I got an error again :-(

Why isn't it working? 


I also tried with value 'Read'