You need to sign in to do that
Don't have an account?
ramya1
How can a case be visible to CreatedBy User?
Hi,
How can we make a case visible to the created by user?
In the sharing Settings we have it as private..How can we make it visible to only the createdby user?
Thanks in Advance.
Ramya.
HI ,
Thanks for reply.
I have read Caseshare, when I am trying to Insert record then I am getting Error:
Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger prmSharingTrigger caused an unexpected exception, contact your administrator: prmSharingTrigger: execution of AfterInsert caused by: System.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []: Trigger.prmSharingTrigger: line 5, column 1
trigger SharingTrigger on Case (after insert) {
for (Case a : Trigger.new)
{
CaseShare newCaseShare = new CaseShare(caseId=a.id,UserOrGroupId=a.LastModifiedById,CaseAccessLevel='Read');
Insert newCaseShare;
}
Is this casse associated with any account?
Hi Ramya,
Do you have the solution to this yet?
trigger SharingTrigger on Case (after insert) {
for (Case a : Trigger.new)
{
CaseShare newCaseShare = new CaseShare(caseId=a.id,UserOrGroupId=a.LastModifiedById,CaseAccessLevel='Read');
Insert newCaseShare;
}
The above code is throwing the error :
Compile Error: Field is not writeable: AccountShare.AccountAccessLevel at line 4 column 64
Compile Error: Field is not writeable: CaseShare.CaseId at line 6 column 47
Please help..
Thanks!