You need to sign in to do that
Don't have an account?
Muneendar baddam
Apex sharing rule on case object
i have two public groups ,each group have one user. when ever i created a case from group1 user that shoud be give read access to group2 users.. by using Apex sharing...thanks
First you need to check your OWD for case ,As we can extend sharing hrough sharing rule ,we can not restrict .
If you want apex sharing then you need to write a trigger in case .
Step1 -Event should after insert .
step2-Needs to check the loged in user is the first grop user and then needs to create a CaseShare record .
In case share caseid should the inserted case Id .
UserOrGroupId should the second gruop id or user id .
CaseAccessLevel needs to set read only .
How ever if your OWD is private then only it will work .
Let me know any issue .
Thanks
Manoj