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
MLamb2005MLamb2005 

Enable record sharing through Outbound Messaging

Hi all,
 
I've been involved with SF customization for about 6 months now, and I'm just starting to dig into the more advanced features.  Right now I'm trying to solve a sharing / record visibility problem.  You can read a detailed description in this forum: http://community.salesforce.com/sforce/board/message?board.id=discuss&thread.id=6846 but essentially what I'm trying to implement is conditional sharing / visibility, based on some value.  What I want to occur is, when the checkbox 'Visible to Client A' is checked, the public group 'Client A' needs to get visibility of that record.  This can be done through manual sharing, but that is obviously tedious and I would like to automate that process.
 
Outbound Messaging came up as a potential solution.  Can anyone point me in the right direction about how to make this happen?
 
Thanks a ton.
 
Matt
RickyGRickyG
Matt -

Well, I am not sure how you would do this with outbound messaging, but the next release of the platform will include a feature called Apex sharing, where you can use Apex code to assign sharing.  This sounds like a good match for your scenario.

Hope this helps.
MLamb2005MLamb2005
Rick-
 
Thanks for the heads up about Apex sharing, that sounds like just what I've been looking for.  A newbie question, can I tie an Apex code block to a particular field on a page?  So every time a drop-down selection changes, a particular block of code would run?
 
Thanks,
Matt
MLamb2005MLamb2005

Almost forgot, the way I understood how to leverage Outbound Messaging was to build a listener that received the session ID, record ID and group ID, then sent a response back to SFDC and assigned the group ID to the sharing of the record ID.  Not sure of all the in's and out's, but that's my understanding for what it's worth.

Matt

Sai LavuSai Lavu
I haven't attempted this myself yet but I believe you can achieve the sharing via apex trigger by entering a record into the custom object's share table.
RickyGRickyG
A newbie question, can I tie an Apex code block to a particular field on a page?  So every time a drop-down selection changes, a particular block of code would run?

Apex code can reference a field in a page, but only when the page is submitted.  So you can't do exactly what you want with standard Apex code at this time.  Visualforce pages, currently in Developer Preview, will make it possible to respond to this type of client-side events, but Visualforce is not yet in production. 

Hope this helps.
MLamb2005MLamb2005
Sai -
 
Thanks for the heads up, I'll be sure to investigate the possibility.
 
 
Rick -
 
Actually, I could make it work if the code would run on page submission.  Is Sai's suggestion currently feasible?