You need to sign in to do that
Don't have an account?
Send Email to case record followers when case record update
Hi,
I required to send email to all follower of a case record when this case record is updated by some one else.
Suppose that i have followed a case record R1 which created by other user. If R1 record owner update that record then i want to receive an email regarding what has been updated for record R1 which followed by me.
For this, i thought to create update trigger on case but problem is that how to get all followers of that case record.
Thanks.
I required to send email to all follower of a case record when this case record is updated by some one else.
Suppose that i have followed a case record R1 which created by other user. If R1 record owner update that record then i want to receive an email regarding what has been updated for record R1 which followed by me.
For this, i thought to create update trigger on case but problem is that how to get all followers of that case record.
Thanks.
To get the followers who are following other users,cases .....you can do like this..
samplequery=[select id,ParentId,SubscriberId from EntitySubscription ] ;
ParentId->>>>>ID of the record or user which the user is following.
SubscriberId ->>>> ID of the User who is following the record or user.
so by the subscriberId you can fetch the user email and ad it to the sendto of single email messaging...
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_entitysubscription.htm
hope this helps you..
mark it as best answer if it resoved your issue...
Thanks
Vishnu R
All Answers
To get the followers who are following other users,cases .....you can do like this..
samplequery=[select id,ParentId,SubscriberId from EntitySubscription ] ;
ParentId->>>>>ID of the record or user which the user is following.
SubscriberId ->>>> ID of the User who is following the record or user.
so by the subscriberId you can fetch the user email and ad it to the sendto of single email messaging...
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_entitysubscription.htm
hope this helps you..
mark it as best answer if it resoved your issue...
Thanks
Vishnu R
Thanks for giving me a correct solution for what i was trying to do. But now i need to it without trigger can you sugges me some possible how can i carry out theses task without apex trigger.
Thanks in advance.
Regards
Banwari kevat