You need to sign in to do that
Don't have an account?
shaker shaikh
trigger for sharing record and error - Field is not writeable: CaseShare.CaseAccessLevel
the below written trigger showing error - Field is not writeable: CaseShare.CaseAccessLevel
trigger case_share on Case (After insert) {
List<caseShare> csshare = new List<caseShare>();
user ur = [SELECT id from user where Alias = 'ujosh'];
for(Case c: Trigger.new){
if(c.Priority=='High' && c.Origin=='Email'){
caseShare cs = new caseShare();
cs.caseid = c.id;
cs.caseAccessLevel = 'Edit';
cs.UserOrGroupId = ur.id;
cs.RowCause = 'Manual';
}
csshare.add(cs);
}
}
unable to understand where i am making error plz help ...
trigger case_share on Case (After insert) {
List<caseShare> csshare = new List<caseShare>();
user ur = [SELECT id from user where Alias = 'ujosh'];
for(Case c: Trigger.new){
if(c.Priority=='High' && c.Origin=='Email'){
caseShare cs = new caseShare();
cs.caseid = c.id;
cs.caseAccessLevel = 'Edit';
cs.UserOrGroupId = ur.id;
cs.RowCause = 'Manual';
}
csshare.add(cs);
}
}
unable to understand where i am making error plz help ...
1) http://blog.jeffdouglas.com/2011/03/17/opportunityaccesslevel-not-writable/
I've seen the CaseAccessLevel field cannot be inserted, but it can be changed with an update once the record is already inserted
Let us know if this will help you
i have gone through the link you provided, still i could't get can you please provide more detial on this