Skip to main content
All CollectionsSalesforce How-Tos and Best Practices
Deleting a Picklist Field vs Replacing a Picklist Field
Deleting a Picklist Field vs Replacing a Picklist Field
Engineering Swantide avatar
Written by Engineering Swantide
Updated over a year ago

Managing picklist values, especially in critical standard fields like the "StageName" in Salesforce Opportunities, is crucial because changes can have ripple effects throughout your Salesforce environment. Here's a detailed breakdown of the difference between replacing a picklist value using the "Replace" button and deleting a picklist value then adding a new one.

Prior to Replacing or Deactivating any Stages, do an Audit of all your Flows, Process Builders, Validation Rules, Forecast Categories to ensure you have a plan to replace the soon to be Inactive Stage Name with the New Stage Name.

Steps for Using "Replace"

To Replace Your Stage

Go to your Opportunity Stages > Fields and Relationships> Search "Stage" in the Quick Find Box

Click Replace.

Type the Stage you want Replaced with the New Stage. In this case, I am replacing, "Meeting Set" with "Qualification"

Once you replace the field value, you can see the job in progress under Setup > Background Jobs.

Once Replace your Picklist Value, you would want to Deactivate it, so it no longer show up for Selection for your Reps.

Using the "Replace" Button for Picklist Values:

  1. Update & Preserve Data:

    1. When you use "Replace," Salesforce allows you to replace an existing picklist value with another value, and it automatically updates all records that have the old value with the new one.

  2. Maintain Field Integrity:

    1. The "Replace" functionality ensures data consistency and helps maintain the integrity of historical data by updating all instances where the replaced value is used.

  3. Automation & Reporting:

    1. All the related automation and reporting which reference the old picklist value will still be valid if the value is replaced (though they'll now reference the new value), maintaining operational stability.

  4. Audit Trail:

    1. The replacement and update of data due to the replacement can typically be tracked in the setup audit trail.

Steps for Using Deactivate and Delete:

To Deactivate Your Stage

Go to your Opportunity Stages > Fields and Relationships> Search "Stage" in the Quick Find Box

Click the Stage in which you want to Deactivate.

Once Deactivated, they will show up under "Inactive Values". You also will have the option to Hard Delete the Stage, in which case, Salesforce will ask if you want to replace the Stage with an Active Value.

Deleting a Picklist Value and Adding a New One:

  1. Data Consistency Risk:

    1. When you delete a picklist value, it will no longer be available in the picklist, but existing records with the deleted value will retain it, leading to inconsistencies in data. New records cannot be set with the deleted value, but old records will display it.

  2. Report & Dashboard Issues:

    1. Reports, dashboards, or list views that specifically look for the deleted picklist value may show incorrect data or may not work as expected.

  3. Automation Breakdown:

    1. Workflows, process builders, or validation rules that are using the deleted picklist value might stop working correctly or may generate errors, as the value they reference no longer exists.

  4. Audit and Compliance Concerns:

    1. Since deleting a picklist value does not update existing records that use it, you might run into issues with data compliance and auditing.

Using the "Replace" functionality on a picklist value in Salesforce does automatically update all records that use the old value to the new value, ensuring data consistency. However, it does not automatically update metadata, such as validation rules, workflow rules, flows, or process builder processes that reference the old picklist value.

Further Consideration for Using Replace:

  1. Records:

    1. Does Update: All existing records using the old picklist value are updated to use the new value.

  2. Validation Rules, Workflow Rules, Process Builder, and Flows:

    1. Does NOT Update: Any instance where the old picklist value is hardcoded (e.g., in formulas, criteria, or conditions) within your automation tools and validation rules will not automatically update to use the new value.

    2. Requires Manual Update: You will need to manually update all instances where the old picklist value is referenced in validation rules, workflow rules, flows, process builders, Apex code, and any other metadata or automation.

    3. Risk of Broken Automations: If the old value is not updated in your automation and validation rules, it may cause them to fail or behave unexpectedly.

  3. Reports and List Views:

    1. May Need Updating: Even though records are updated, any reports, dashboards, or list views that filter using the old picklist value need to be manually updated to use the new value.

  4. Apex Code:

    1. Does NOT Update:** Any Apex code that references the old picklist value will need to be manually updated and redeployed.

Best Practices for Using "Replace:

  1. Audit: Identify all places where the old picklist value is used or referenced, including validation rules, automation, code, and reporting.

  2. Communicate: Ensure all stakeholders and users are informed of the change, how it might impact them, and any necessary actions they might need to take (like updating personal reports or list views).

  3. Test: Use a sandbox to test the replacement and update of automations to ensure everything works as expected before making changes in the production environment.

  4. Document: Maintain thorough documentation about the changes, including where manual updates were made, to facilitate troubleshooting or future work in your Salesforce org.

Always approach data and metadata changes in Salesforce with caution and thorough planning to ensure continuity and integrity of both data and functionality.

Summary:

  • Using "Replace": Ensures data consistency and functional integrity by updating all instances of the old value to the new value across all records, reporting, and automation.

  • Deleting and Adding: Could introduce data inconsistencies and functional disruptions due to the discrepancy between historical and new data, and the impact on reports and automated processes.

Always be sure to thoroughly assess the impact, communicate changes with stakeholders, and test in a sandbox environment to understand all ramifications before modifying picklist values in a production environment. Always adhere to best practices for change management in Salesforce.

Did this answer your question?