Create a Trigger to Maintain Lead Visibility
Add a trigger that grants sharing access to the person who created the lead even when
they’re no longer the lead’s owner. Granting sharing access enables the lead’s creator to
track the referral after it’s converted to an opportunity.
|
Available in: Lightning Experience Available in: Enterprise and Unlimited Editions with Health Cloud |
To access the LeadShare and OpportunityShare objects, sharing for the Lead and Opportunity objects must be set to Private or Public Read Only.
- From Setup, select Customize and then click Lead.
- Click Triggers and then click New.
-
To define your trigger, enter Apex code similar to this sample code.