Chatter only provides feature to auto-follow based on ownership.
I have a requirement that manager should auto-follow cases and tasks of agents that falls under their hierarchy of role. eg manager-subordinate.
How can this be achieved?
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
There is good Appexchange product which you can try if fulfills your requirement. Or you can write some trigger to autofollow.
//Logic to see if logged in User reports to Manager EntitySubscription es = new EntitySubscription(); es.ParentId = aid; es.SubscriberId = "<Managers User Id>" ; insert es ;