Idan Bliech
Nov 3 · 2 min read

Before starting new package creation you should clean your dev org from all unnecessary salesforce component like : custom fields, links, page layouts and more.

Do not all namespace to the org before delete all custom components.

TL;DR;

Package Link : https://4winds.link/cleanOrgFiles

Deploy :

using sfdx:

 sfdx force:mdapi:deploy -f deleteAll.zip -u <User/Alias> -w 10

using workbench:

https://workbench.developerforce.com/

What include in the file:

  1. package.xml : 4 layouts for remove the dependency of custom links on the layouts
  2. destructiveChangesPost.xml : all unnecessary component to be delete, full list is below.

Full component to be delete list

CustomField

  1. Account.UpsellOpportunity__c
  2. Account.SLASerialNumber__c
  3. Account.Active__c
  4. Account.NumberofLocations__c
  5. Account.CustomerPriority__c
  6. Account.SLA__c
  7. Account.SLAExpirationDate__c
  8. Case.PotentialLiability__c
  9. Case.Product__c
  10. Case.SLAViolation__c
  11. Case.EngineeringReqNumber__c
  12. Contact.Level__c
  13. Contact.Languages__c
  14. Lead.SICCode__c
  15. Lead.Primary__c
  16. Lead.CurrentGenerators__c
  17. Lead.NumberofLocations__c
  18. Lead.ProductInterest__c
  19. Opportunity.CurrentGenerators__c
  20. Opportunity.OrderNumber__c
  21. Opportunity.TrackingNumber__c
  22. Opportunity.DeliveryInstallationStatus__c
  23. Opportunity.MainCompetitors__c

AssignmentRule

  1. Case.Standard
  2. Lead.Standard

EscalationRule

1.Case.Standard

HomePageLayout

1.DE Default

Layout

  1. Account-Account %28Marketing%29 Layout
  2. Account-Account %28Sales%29 Layout
  3. Account-Account %28Support%29 Layout
  4. Case-Case %28Marketing%29 Layout
  5. Case-Case %28Sales%29 Layout
  6. Case-Case %28Support%29 Layout
  7. Contact-Contact %28Marketing%29 Layout
  8. Contact-Contact %28Sales%29 Layout
  9. Contact-Contact %28Support%29 Layout
  10. Lead-Lead %28Marketing%29 Layout
  11. Lead-Lead %28Sales%29 Layout
  12. Lead-Lead %28Support%29 Layout
  13. Opportunity-Opportunity %28Marketing%29 Layout
  14. Opportunity-Opportunity %28Sales%29 Layout
  15. Opportunity-Opportunity %28Support%29 Layout

Profile

  1. Custom%3A Marketing Profile
  2. Custom%3A Sales Profile
  3. Custom%3A Support Profile

RemoteSiteSetting

  1. ApexDevNet

WebLink

  1. Account.Billing
  2. Campaign.ViewCampaignInfluenceReport
  3. Case.UpsellCrosssellOpportunity
  4. Opportunity.DeliveryStatus

Please update me for any New/Update/Missing component.


Idan Bliech

Written by

Salesforce Technical Architect ⚙️ Israel User Group Leader ⚙️ Soon on the AppExchange sbxmanager.com

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade