You need to sign in to do that
Don't have an account?
youji37
insert into CaseShare object
I try to insert record into caseshare object, get the following error.
Invalid id value for this SObject type: 500R0000001bUb5IAE: Trigger.prmSharingTrigger: line 14, column 22
my code is
for (Case a : Trigger.new) {
if(a.RecordTypeId == '012R00000008hE5'){
CaseShare newCaseShare = new CaseShare(
id = a.id,
UserOrGroupId=a.CreatedById,
CaseAccessLevel='Read'
);
insert newCaseShare;
Oh wait. Duh. I spoke too soon.
You can't set the Id field. Set the CaseId field instead to your case's ID.
All Answers
Oh wait. Duh. I spoke too soon.
You can't set the Id field. Set the CaseId field instead to your case's ID.