Are you two just not working out? Has he been lying to you with bad data? Or have you just out grown each other? No matter what the reason, things have to end. It’s ok, not all fields are meant to be in Salesforce forever. Don’t rip that band-aid just yet through, these things take time.
Ok, so yes, we’ve all been there, we need to kick a field to the curb, but I don’t know about you, but I’ve been burned here pretty bad. None of us want to cause an uproar, our lives are crazy enough without adding extra stress, so here are a few tips on slowly getting rid of a field.
First things first, how did you get to the point where you are now, deciding that the field needs to go?
- Was it that mysterious field that nobody has been able to give a business purpose for since you started?
- Did you realize that it wasn’t being used after a recent field trip?
- Has your business process changed and it is no longer of value?
- Are you replacing this field with another field?
If you are in situations 1, 2, or 3, you will want to find out what value, if any, this field has to users. How to do that:
- Check your WFRs and Validation Rules for the Field. I like to do this with the Force.com IDE, you can find the IDE details on developerforce. You never know what is out there for how a field is being used. When I went to switch to State and Country Picklists, I received 3 full pages of references
- Step One: Create a new Project with Triggers, Apex classes, and Pages
- Step Two: add the Validation Rules, Workflow Rules (the rule and the field updates), email templates, components, page layouts, reports, flow
- Step Three: Search for the field name
- Step Four: Don’t remove the field from these locations yet, instead make note of them and determine how you will go about continuing the functionality. In some cases, its easy, you can just no longer reference it, but in other cases, you will need to find out how to trigger the workflow rule, or how to re-write the template.
- Have your list? OK, awesome, next up
- Export the data. Export it and SAVE it.
- Use Enabler4Excel, DataLoader, Dataloader.io doesn’t matter just get a copy of the field’s value on EVERY record, and don’t forget to get the ID, not just the Account Name, or Contact Email.
- Now that you have the data exported, save it to the cloud, share with necessary parties
- Remove the field from the page layouts –
- Removing the field from the page is an easy way to use if users fill it in, or look to fill it in regularly. See if users mention the field missing when they are creating/editing records, and if they do, decide if you still want to remove it.
- Hide the field with field level security.
- Now you’re getting somewhere, this will remove the field from the report field options, so not only is it not on the page, but you can’t find the field, can’t see the field in reports, can’t search for the field. Now sit back and wait.
- Take the list of locations the field is used from step one and decide what, if anything, needs to be replaced. Work with other teams if necessary, E.g. don’t mess with Marketing’s Templates without asking, and don’t change the Global Sales Reports without reviewing.
- if you are replacing the field with a new fancier version, this is when you can prep your data, VLOOKUP the heck out of a COPY of the exported data. Do Not Mess With The Original Export!
- If there are reports using this field, do a Find and Replace with the IDE, it will save you not only time, but it will save your sanity.
6. When enough time has passed and you have made sure that you won’t need the field, go ahead, stay strong, double-check you still have that backup file, and press the button. You know you want to. I promise it won’t hurt.
Viola! You have deleted a field and feel confident in your work AND secure knowing you have the data backed up for not just rollback but reporting purposes. Nice work!
*There were no fields harmed in the making of this post.