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
Salesforce BlitzSalesforce Blitz 

Trigger to send record in email body

I have a Workflow which sends email link of record to set of users when Opportunity probability >=70.
I have OWD set to private.
So the users are facing insufficient privilages error when clicking n the link.
Any alternative way of achieveing this.Need to display record to the email recepient.
(Big Deal Alert doesn't suit our requirement as we have VF pages over riding the PageLayouts).

Any help/suggestion appreciated.

Medhya MahajanMedhya Mahajan

You can use one of the following:

Create a VF and execute it on System Mode ( ie. use without sharing in your Controller Class). Use <apex:detail> tab to show the link of the opportunity which you can get from you controller by querying.


Write APEX SHARING to grant the access to your users everytime. 


Assuming your account is Private too, you could create a saring rule with criteria Opportunity probability >=70.

Medhya Mahajan