I am creating a case by associating it with contact.
- OWD of Case: Private
- OWD of Account: Private
- OWD of Contact: Controlled by parent
Case assignment will change the owner to a queue on case creation.
Sharing rule created:
On Account: Criteria based sharing rule : All internal users access provided (CASE ACCESS PRIVATE ON ACCOUNT SHARING RULE)
On Case: Criteria based sharing rule: All internal users access provided
Issue: When I am creating a case, I am getting insufficient access to cross reference id.
I want to retain the access of the creator of the case. I saw few other stack exchange resolved answers and found people are suggesting to add creator on the case team. But that I shouldn't be doing because i have a sharing rule to provide access to case for all internal users.
Just fyi: If i add creator to the queue itself which will get assigned via assignment rule, then access is retained because creator is present as owner within queue --- But i dont want to put creator within queue.
Update:
While analysis this issue a bite more, I found out that the assignment rule is sending out an email to the queue members. The email template is a visualforce email template. If I changed it to basic text email template, it works. I even remove code from VF template and template I provided above in question. Still it did not work...but when i used text email template it works
VF template:
<messaging:emailTemplate subject="Case # {!relatedTo.Casenumber} has been assigned to you " relatedToType="Case">
<messaging:htmlEmailBody >
test
</messaging:htmlEmailBody> </messaging:emailTemplate>
Now, if i remove: the only merge field present in vf template, it started to work !