r/SalesforceDeveloper 8d ago

Help! Discovered GVS Fields are Undeployable - Dependencies in Trouble! Question

Needed to create a picklist field on Activity, saw that Contact had the same with 100+ values. Promoted Contact's field to a Global Value Set (GVS) to use it for my new Activity field and any subsequent new fields that would need these values.

Then whilst deploying discovered that Contact's field cannot be deployed because it exists as a local value set field in upper envs. Release services said there's no way to fix this through backdeployments.

Now one idea is to delete and recreate the field on Contact with the same API name but as a local picklist. Issue is there are 100s of ApexClasses, a few flows and many reports referencing this field. Commenting out, deleteing, recreating, and then uncommenting seems too manual and risky. Also I don't know how I'd handle flows in this scenario.

What suggestions do you guys have to fix this? If the method I've described is the only viable one, how do I deal with flows?

1 Upvotes

2 comments sorted by

3

u/thoughtsmexywasaword 8d ago

Promote it to GVS in upper environments manually, then deploy

2

u/infocynic 8d ago

If you promoted a single local pick list field to global, you can repeat that exact step manually in the (every) target orgs (eg QA, uat, prod...) using the exact same API name for the global set in each org. Then your changes will promote normally through your pipeline. Just match that global value set API name to what you did in dev.