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
shruthi sj 7shruthi sj 7 

I have a button close, when i click on it i should get only close option in status field not any other options from status field

How can i achieve below activity.
I have a button "close", when i click on close button i should get only close option in status field not any other options from status field.
 
Jason FlippenJason Flippen
Assuming this is a custom button and the status field is a picklist, you can create a new Record Type on the object you're working with that only shows the "close" option for that (picklist) field.  In the code for the custom button you would then set the status field to "close" and change the Record Type to the one you just created.  After doing that, the next time you try to edit the record the status field will only show "close".

I hope this helps.

Jason