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

Create case button with values

I want to see ‘Create case’ button  in opportunity view after an opportunity is Closed(won)
This button should not be visible/functional before Closed (won) status
On clicking this button, a new ‘Case’ should be created values taken from opportunity
Best Answer chosen by keshava65
Praveen KHariPraveen KHari
You should create new record type for closed cases and assign a new page layout for that record type. When ever you close a case change the record type to new one. Include the Create Case button only on closed opp page laout and assign this layout Closed opp. record type

Below link will explain how to insert a record on button click using javascript on button