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
Cloud_DragonCloud_Dragon 

Dependency for deletion

Hi Guys,

 

I have a huge list of fields that might need to analyse and delete the unwanted.

 

I am not sure about their dependencies / usage on other workflow or validation rules. Right now I am just opening each field and checking on its dependency.

 

Is there an easy way to do this.

 

Any help would be great!!! thanks folks. :-)

Best Answer chosen by Admin (Salesforce Developers) 
AnnuAnnu

you can go to workbench for salesforce and login with the credentials of org from where you want to delete the fields.

https://workbench.developerforce.com.

 

here in first page Select an Action to Perform. In Jump To dropdown Select Metadata Types & Components. Select WorkFlowFieldUpdate from the dropdown in next Page. you will get the list of all the fields which are used in workflow field Updates.

 

If you make list of these field then you need not check each and every field before deleting it.

 

Hope this helps you.

 

 

All Answers

sfdcfoxsfdcfox

There is no easy way to do this, sadly. About the best you can do is to take that huge list of fields to delete, create an Ant toolkit script to attempt to delete them, and read the deploy logs in regards to failures. I'd like to note that this isn't foolproof, as you can't see every dependency even then-- reports won't complain about the missing fields, nor page layouts, nor Dynamic Apex Code that depends on these fields (unless you include runAllTests to make sure all of your code still runs). I'd say the safest way to absolutely ensure that you don't delete anything you'll miss is to use the Ant toolkit to pull out reports and page layouts, then create a destructiveChanges.xml file that names fields to delete, then try to deploy it. If any page layouts or reports fail, you'll know that those fields were in use. You can also run the Ant toolkit in "verify mode" just to see what errors come up without actually blowing away all this data.

AnnuAnnu

you can go to workbench for salesforce and login with the credentials of org from where you want to delete the fields.

https://workbench.developerforce.com.

 

here in first page Select an Action to Perform. In Jump To dropdown Select Metadata Types & Components. Select WorkFlowFieldUpdate from the dropdown in next Page. you will get the list of all the fields which are used in workflow field Updates.

 

If you make list of these field then you need not check each and every field before deleting it.

 

Hope this helps you.

 

 

This was selected as the best answer
Cloud_DragonCloud_Dragon

Hello!! Thanks let me try and update..