Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I have custom object which is private where users share records with other users manually. I want to send email notification to the shared user whenever a record is shared to him. How can I achieve this ?

share|improve this question
5  
It always helps if you provide information about the research you have already done. What have you tried, what exactly can't you figure out... –  Daniel Blackhall Jan 14 '13 at 7:09
add comment

1 Answer 1

You can query back the share records .share records will have userId with whom its shared and also the record Id so all you will need to do is use messaging.email to send to the respective users

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_bulk_sharing_creating_with_apex.htm

Here is the document link you can use to get started .

http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_classes_email_outbound.htm

Above on how to use outbound email functionality.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.