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
knicholsknichols 

sharing notifications

Is there a way to notify the user (or group of users) when they have been granted sharing to a custom object record?  The use case is, we have a custom object and the person that has just been granted sharing doesn't know anything about it.  So we would like to notify them via email.  It doesn't look like you can do a trigger on the sharing table but I thought someone else might know of a way to do it.
aalbertaalbert
Assuming you are writing some Apex to insert into the custom object's share table, you could also use Apex outbound Email classes to send an email to that same user.
knicholsknichols
I was hoping to avoid having to rewrite the sharing screen they created to implement this functionality.  So you think that's the only way to do it?
aalbertaalbert

Is the sharing screen a custom Visualforce screen?

You won't have to re-write the screen or page. But instead, just extend the controller (ie Apex class) to send an email. It shouldn't be a lot of code that needs to be added. 

knicholsknichols
No, it's the standard sharing button that shows up on a private data model.
aalbertaalbert

Ah, sorry. I see your point of wanting to tie it to a trigger on the __Share object. I thought you had written some apex to manage the sharing and not the standard functionality. I am not sure of any workflow rules you can leverage to do this without written some apex to grant the sharing and the email. Sorry for the confusion.