---
title: "Org Clean Up Example"
description: "Walk through cleaning up unused custom fields on the Account object in Strongpoint for Salesforce, from filtering and risk review to approval and validation."
sidebar_position: 50
---

# Org Clean Up Example

Here is an example using the simplest clean up case:

- Unused custom fields on Account object
- No risky dependencies

Using the steps outlined in Org Clean Up, you can proceed with a clear, repeatable process.

## Step 1: Identify and Prioritize Targets for Clean Up

Use the Default Clean Up List View with these filters:

![Filters](/images/platgovsalesforce/tech_debt/tech_debt_9.webp)

- Filter on the single Record Type **Objects & Fields** to enable editing the Customizations
  directly from the List View. This filter selects all Objects and their related Fields.
- Filter for API Names starting with **Account** (for example, **Account.\_**your_custom_field)
  limits results to the **Account** object. Use a similar technique to focus on a specific
  App.
- Filter on **Salesforce CustomField** to return all Custom Fields.
- Filter to exclude **Standard** fields. The Salesforce metadata type for all fields is CustomField.
  Strongpoint for Salesforce identifies standard fields and appends **Standard:
  object_name** to the Customization Name so they can be filtered out of your results.
- In this example, **unused** means _not used within the last six months_, so finish with a
  Date Last Used filter.

Specify the fields to show:

- Name
- Base Record: the parent for fields on an Object and the Base Object for other Customizations.
- Owner
- Date Last Used
- Clean Up Comments: freeform area to add notes about your investigation.
- Clean Up Classification - freeform area to organize clean up projects. For example, _Account
  Spring Clean Up_.
- Clean Up Status: specific tracking of the stages of a clean up project.
- Reports
- Scripts
- Workflows / Approvals
- Extended Types
- % Populated

## Step 2: Assess the Risk of Downstream Problems and Add Related Customizations

You now have a list of unused, custom fields on the Account object. Examine the dependencies to
determine what to do next. For this example, the focus is on fields without these
complications.

1. Set the **Clean Up Status** on any field without dependencies to **To Be Cleaned Up**. In the
   List View, click the
   ![Edit icon](/images/platgovsalesforce/tech_debt/edit_icon.webp)
   icon and edit the **Clean Up Status** and other Clean Up Fields. You can select multiple fields
   using the checkboxes to set the values for the group.
2. To find the group later, set a project name in the **Clean Up Classification** field such as
   _Simple Account Clean Up_. You can filter on this later when you send for approval.
3. If you have questions, send an email or Chatter request to the owner and set the **Clean Up
   Status** to _Send Request Info Email_ as a reminder you are awaiting a response.
4. As you find unused fields with complex dependencies, such as Scripts or Workflows / Approvals,
   set the **Clean Up Status** to **Under Investigation**. As an example, you can also assign the
   **Clean Up Classification** to be _Scripted Account Fields_ to group them for your investigation
   later.
5. These fields need investigation to see if they can be cleaned up and, more importantly, if the
   scripts and workflows are still useful, need to be fixed, or cleaned up. What are the scripts or
   workflows doing if there is no data in the field?
6. As you work through the list, note your findings in the **Clean Up Comments** field.
7. To keep an unused field, set the **Clean Up Status** to **Ignore**. Alternatively, set the **Date Last Used** to a date in the future. Strongpoint for Salesforce doesn't override the manually set date with an earlier date, so you can retain the customization. To view
   ignored Customizations, select:
   **Strongpoint** > **Reports** > **Clean Up** > **Customizations Excluded From Clean Up**

:::tip
If you are cleaning up a very large object, add a filter for **Clean Up Status** equals **“”**. This shortens your list as you work your way through the fields and set an appropriate **Clean Up Status**. Remove the filter later when you want to work through the fields.

- **Archived**: tracks automatically cleaned up Reports.
- **Deleted**: tracks Customizations that have been deleted.
- **Reassign Owner**: reassigns the Owner of one or more Customizations.
:::

## Step 3: Track the Progress of the Clean Up Process

You now have a list of unused fields on the Account object grouped into fields that are relatively
simple to clean up and fields with code and other critical dependencies.

:::tip
If you have a blank List View, remove the filter on the **Clean Up Status** or set it to **To Be Cleaned Up**. If you set a **Project Name** in the **Clean Up Classification**, you can filter for it in the search box at the top of the List View.
:::

Some of the fields may have associated Reports or List Views. If you open the DRD in the
Customization Record, you can drill into the details to see if removing the field is likely to cause
a problem. Some things to consider:

- List Views don't track Date Last Used. Be careful cleaning up them up. Reports do track DLU.
- Cleaning up fields used in **Report Filters** can change the scope of the report. You can check
  whether the field is used in the report filter by looking at the **Search Filters** checkbox
  field.
- Fields on actively used Reports should have **Clean Up Status** set to **Under Investigation** and
  a plan for cleaning up the Report documented in the **Clean Up Comments** field. You might want to
  email or Chatter with the owner to determine whether it is safe to clean up. Set the status to
  **Send Request Info Emails** as a reminder.

## Step 4: Group Customizations for Approval and Clean Up

Now that you have identified the Customizations that can be cleaned up, you can proceed with the
approval process. Related Customizations can be grouped and managed using a **Change Request**.

1. Click the **Change Request** tab and click **New**.
2. Enter the name and a brief description of the clean up project. Set the **Change Type** to
   **Clean Up**. If you are using an external change approval system such as Jira or ServiceNow, you
   can enter the **External Change Request Number**.

    ![Clean Up Unused Fields - Change Request](/images/platgovsalesforce/tech_debt/clean_up_unused_fields_change_request.webp)

3. Open the Change Request and navigate to the **Customizations** tab.
4. Click **Add/Remove** to add Customizations to the Change Request.

    ![Add Customizations to Change Request](/images/platgovsalesforce/tech_debt/add_customizations_to_change_request.webp)

5. In the **Add Customizations to Change Request** window:
   - Use **Customization Name** to search for Customizations.
   - Use **Salesforce Type** to filter by metadata type (for example, **CustomField**).
   - Optionally filter by **Namespace** or **Last Modified By**.
   - Select one or more Customizations using the checkboxes.
   - Click **Confirm Selection** to add them to the Change Request.

    ![Add Customizations to Change Request](/images/platgovsalesforce/tech_debt/add_customizations_to_change_request_2.webp)

6. The selected Customizations appear in the **Customizations** tab of the Change Request. From this
   view, you can:
   - Review the list of Customizations included in the clean up.
   - Remove Customizations if needed.
   - Export the list using **Export to CSV**.

    ![Selected Customizations](/images/platgovsalesforce/tech_debt/selected_customizations.webp)

7. Navigate to the **Impact Analysis** tab to review the potential impact of cleaning up the selected
   Customizations.

    ![Impact Analysis](/images/platgovsalesforce/tech_debt/impact_analysis_tabs_1.webp)

    ![Impact Analysis](/images/platgovsalesforce/tech_debt/impact_analysis_tabs_2.webp)

   The Impact Analysis categorizes Customizations into the following sections:
   - **Can Be Safely Deleted or Modified**
   - **Can't Be Safely Deleted or Modified**
   - **Inactive Customizations**

   This analysis identifies dependencies such as references in reports, scripts, workflows, or other
   metadata that could be affected by the clean up.

8. Review the Impact Analysis results. If customizations appear under **Can't Be Safely Deleted or Modified**, investigate or remediate them before proceeding.

9. When you are satisfied with the scope and impact of the clean up, submit the Change Request for
   approval.


:::tip
You can add additional approvers (beyond what is required for the policy) to the Change Request. Initially, only the approvers from your default policy are required. There are two methods to add additional approvers:

- Create a Process Record and specify approvers. Add the Process Record to the Change Request under the **Affected Processes** field. The additional approvers are added to this Change Request and can be reused on future Change Requests. **Process Owner Approvals** must be enabled on the applicable Policy.
- Manually specify one or more approvers in the **Additional Approvers** field.
:::

To export results without Change Enablement, click **Export To Excel** on the Change Request **Impact Analysis** tab. You can also create a report of Customization Records (third-party apps can enable List View export). Verify the impact and manually route your list for approval.

## Step 5: Archive the Customization Definition / Data

Your metadata is automatically archived for the field. Best practice is to create a Report with all
of the non-empty fields you are cleaning up, and store it on the Change Request before you clean up
the fields.

## Step 6: Clean Up Approved Customizations

Clean up the fields in a sandbox first, run your test sets, and review the changes with the affected business owners before making the change in production.

Strongpoint for Salesforce tools don't support deleting items. To remove objects in bulk, use [Destructive Change Sets](https://developer.salesforce.com/docs/atlas.en-us.daas.meta/daas/daas_destructive_changes.htm). You can also remove them manually.

## Step 7: Validate Your Change Approval Process Was Followed

Use the **Unresolved Non-Compliant Changes** report to confirm that your change approval process is being followed. This report summarizes all changes where a Change Request was
required by policy, but either not created or not approved. The report includes these details:

- Customization Name and API Name
- Metadata Type (for example, **CustomField**, **WorkflowAlert**, **ApexClass**)
- Change Overview (for example, **Custom Field Created**, **WorkflowAlert Changed**, **ApexClass
  Created**)
- Diff Summary (detailed comparison of before and after)
- Related Change Requests, if they exist

The [Change Enablement Reports](/docs/platgovsalesforce/change-enablement/change_management_reports.md) and List Views
give you visibility into the changes occurring in your orgs.

**Next Technical Debt Topic:**
[Specific Clean Up Approaches](/docs/platgovsalesforce/tech-debt/tech_debt_org_specific_clean_up_approaches.md)
