Hi,
Thanks for your quick response. So as per my requirement I need to set owd to private for opportunity object using triggers.
So do I need to use OpportunityShare object or is there any procedure to achieve this?
Hi Sanjana and sure. If there is no condition, you can do this by navigating to Setup. Then, in the quick find search box, put "Sharing Settings. Click on the Share Settings Link. You'll see "Organizational-Wide Defaults" and an edit button in the middle of the page. Click on the edit button. In the Object list, go to "Opportunity" and set its "Default Internal Access" to Private. Finally, save the change.
If there is a condition, what is the criteria for when the trigger should be executed?
If there is a condition, what is the criteria for when the trigger should be executed?