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
Phil WitzmannPhil Witzmann 

Help with Triggers

I have a field called "Lead Stage". This lead stage is composed by different stages: "Virgin", "No Answer (1)", "In Progress" and "To Follow Up";

My default value is "Virgin".

How can I develop a trigger that when I move the lead stage from "Virgin" to "No Answer (1)" the value "Virgin" disappears from the picklist?

Thank you



You cann't change the value in the picklist in the sense of metadata (Means you can't delete any value from picklist field)

You can just strick to user to save the value Virgin if already selected "No Answer" through code.

Ashlekh Gera
Hi Phil Witzmann,

Do one thing create a new record type an din that record type you removeVirgin pickllist .When you will chage stage from Virgin to No Answer update the record type to new record type auto matically Virgin will vanish from your picklist .
Check below link to getrecord type id without query !!
I think this will help for sure !!
Let me know if it helps or any further help required !!