How to hide or disable Opportunity detail page Edit button programmatically?
I have created a cutom object called "Project". When an Opportunity is saved, depending on its Stage, it will be made a Project (new record in Project is created). I want the Opportunity to be locked once it was made a Project.
1. Create an Opportunity with Stage = let's say "Proposal" (I changed the the picklist values of the Opportunity Stage field).
2. In the "after update" trigger, a new record is created in the Project custom object.
3. Lock the Opportunity that was made project.
1. When Opportunity Stage chnages to "Proposal"
2. Lock the Opportunity using trigger or work flow