function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JagadeesJagadees 

Can I send an email notification when a lead is shared manually?

I have a profile "abc" which has no access to create a lead but can edit a lead. Now a user under profile "xyz" manually shares a lead to a person under "abc" profile. Here I have two questions - 

1.  Can the person (under ABC profile) to whom the lead is shared be notified via email? If so how can I make this dynamic? How to set the Email template for this?
2. Can the person (under ABC profile) to whom the lead is shared, unshare the lead once he is done acting on the particular lead? Else only the person who shared can do this?

How to achieve these? 
Raj VakatiRaj Vakati
Hi Steev, 
You can write a batch apex on LeadShare Object to send an email when a lead is shared manually.

Select RowCause from LeadShare 
If RowCause= Manual means its shared manually. 


 




 
JagadeesJagadees
RajaMohan,

Thank you. Let me research on this now. 

Do you have any idea on Point 2 [Can the person (under ABC profile) to whom the lead is shared, unshare the lead once he is done acting on the particular lead? Else only the person who shared can do this?]