You need to sign in to do that
Don't have an account?

how to share a record programmatically
Hi,
How do I share a record with another user programmatically? I'm referring to the manual sharing button functionality. Are there any sample codes out there? please help.
thanks
Yes you can. Please see the Apex Documentation:
http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_bulk_sharing_creating_with_apex.htm?SearchType=Stem
Thanks for the Sharing button info. Its very helpful.
Now my next step is to write a trigger to do the sharing after a new record is created. You have any sample codes or tips on how to create this kind of trigger? How do you capture the newly created record ID? please advice.
thanks