Questions tagged [destructivechanges.xml]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
52 views

Deployment order of execution

Can You please tell me when I am using command: sfdx force:source:deploy --manifest "<source>" --testlevel "RunAllTestsInOrg" --ignorewarnings --apiversion "55.0" --...
0 votes
0 answers
21 views

Error when deleting Flow's and Flow Definition's [duplicate]

I have made a destructive package using Workbench. destructiveChanges.xml package.xml I am receiving the following error when trying to delete the Flow, and Flow Definition: "Funds Request ...
  • 93
2 votes
1 answer
263 views

Deploying destructive changes using SFDX with --sourcepath flag

I've seen that finally destructive changes in SFDX deployments have been added - starting from version v53.0 (previously I needed to use ANT because of lack of this functionality). I have tested this ...
1 vote
0 answers
150 views

UNABLE_TO_LOCK_ROW error on user object triggered by platform event trigger only during deployment of destructiveChanges.xml

We have a platform event trigger that fires when users login. It fires hundreds of times per week and does not throw any errors. Three times in the past week, it has thrown an UNABLE_TO_LOCK_ROW ...
  • 4,275
2 votes
1 answer
2k views

SFDX Destructive Changes [duplicate]

Is there an update to the question posed in this post, please? Will SFDX force:source:deploy support destructive changes in the future?
0 votes
0 answers
80 views

Duplicate permissions in permission sets are deleted when using SFDX deploy

For example, if I have <classAccesses> <apexClass>APX_someClass</apexClass> <enabled>true</enabled> </classAccesses> in my foo.permissionset-...
  • 101
0 votes
0 answers
77 views

INSUFFICIENT_ACCESS when attempting to delete LWC from org with destructiveChanges.xml

I am attempting to delete an LWC from a developer org, as the system admin. I had the LWC in a managed package, and have the ability to remove it. However, when I try to delete the LWC with ...
0 votes
1 answer
73 views

Deploy error: List has no rows for assignment to SObject and INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY

I am trying to deploy a destructive package, but I am receiving the following errors in test classes: System.DmlException: Insert failed. First exception on row 0; first error: ...
  • 123
1 vote
1 answer
51 views

How do I destroy apex classes in production if there are dependencies in both the pre and post deployment state?

I ran into an issue recently while trying to retire a project that shared an org with another project. To give an idea of the scope we are going from nearly 3000 unit tests to just over 400 after the ...
0 votes
1 answer
523 views

Issues deleting a flow version

I am having an issue with the deletion of a flow version. Using standard declarative ways the version will not delete and removing the flow all together gives an internal service error so I have been ...
  • 3
1 vote
1 answer
134 views

Why does new version of unlocked package still shows some deleted references in the UI?

Using Metadata API, I deployed a destructive change that removed some unused Apex classes and Custom objects. I then verified on the sandbox that they were indeed deleted. I then created a new version ...
  • 481
0 votes
1 answer
220 views

Do I need to update destructive changes when removing a field translation metadata file?

If I am removing a field from an object and removing the corresponding .fieldTranslation-meta.xml file, do I need to add anything to the destructive changes post file? I know that if I were removing ...
0 votes
2 answers
607 views

Using Destructivechanges.xml and force:source:deploy --ignorewarnings to Production Environment

We are using Github as our source control and Drone.io CI/CD pipelines to handle builds and releases to multiple sandbox environments and our production environment. We would like to use ...
0 votes
2 answers
649 views

Destructive changes for all apexclasses and components

I want to delete all the LWC components and Apexclasses using destructiveChanges.xml. I tried with <types> <members>*</members> <name>LightningComponentBundle&...
0 votes
0 answers
209 views

Destructive Changes throwing warning ApexClass not found

I'm trying to deploy destructiveChanges to my org. The error I keep receiving is Warning: No ApexClass named: CLASS_NAME not found. I find this bizarre because this class DOES exist in the org. Why is ...
1 vote
1 answer
90 views

Better Way to Remove Unused Customisation

Background A couple of years back, my org (Unlimited Edition) was created and we have some customisation derived (baseline branch) from the parent company org (with the hope that the two orgs can ...
0 votes
1 answer
494 views

Issues deleting Apex Classes with Workbench

Struggling with deleting Apex Classes with Workbench. I've followed walkthroughs listed below, but I keep running into an "Invalid Parameter Value" error. The only parameter I can think of is the name ...
0 votes
1 answer
459 views

Deployment of destructive changes to production and tests execution

We need to remove trigger and apex test class for it from production org. We've already put together destructiveChanges.xml and are going to deploy it to prod org via ant migration tool. The question ...
  • 2,813
4 votes
1 answer
803 views

Classifying metadata into destructiveChangesPre.xml vs destructiveChangesPost.xml

I understand how both destructiveChangesPre.xml & destructiveChangesPost.xml work, but I'm wondering if it's possible to algorithmically classify metadata deletions between the two (theoretically; ...
  • 9,607
0 votes
1 answer
1k views

Is it possible to deploy destructive change and new metadata in the same package.xml

Is it possible for exemple to deploy, in the same package, the action of destruct a field and create another in the same time? Or I need to deploy 2 differents packages in two times: - one to ...
  • 363
4 votes
1 answer
688 views

Is there a workflow for renaming or deleting metadata components purely with an SFDX developer flow?

We are currently migrating our Salesforce development workflows to sfdx. We have got CI up and running with CircleCI and really smooth deployments going for when there are additions to metadata or ...
0 votes
2 answers
2k views

destructivechanges.xml build error - -Error: Not in package.xml

I set up and ran destructiveChanges.xml through the ANT tool to delete custom fields from the Activity object in the sandbox. I am getting an error - Error: Not in package.xml build file: <...
0 votes
1 answer
455 views

How to delete unmanaged package along with all components from an org

We have an unmanaged package on an org with thousands of components in this package. And package has not been released yet. Now we'd like to do some clean up and remove this package along with all ...
  • 2,813
4 votes
1 answer
826 views

Delete email template folder with a destructive package

I want to delete a email folder (empty) with a destructive package but I can't make this work. I made a .zip with my 2 files : package.xml <?xml version="1.0" encoding="UTF-8"?> <...
  • 363
0 votes
1 answer
3k views

deploying destructive changes

i'm deploying a destructive change (includes apex classes) into a production environment and it kick starts running all tests. This didn't happen when doing it on the sandbox environments. Any way I ...
  • 178
1 vote
1 answer
2k views

How can I delete field dependencies (controlling values) through destructive changes?

Is there a way to delete just the from my organization for specific fields through destructive changes? I know this can be acomplished through git, but afaik it will not actually remove the ...
  • 11
4 votes
1 answer
122 views

why is undeploy triggering all the apex test in production

I am using the ant migration tool. And this have never happened till today. The ant target to delete looks like <target name="undeployCode"> <sf:deploy username="${sfdc.username}" ...
  • 437
0 votes
0 answers
293 views

Error in deleting a trigger in Production: Invalid type: Schema.sObject

Using destructive package in workbench, I am trying to delete a custom trigger (not Managed) from Production built on Managed package object "Question" and I am getting the error: Invalid type: ...
  • 187
1 vote
1 answer
300 views

Deleting Classes

When you delete an Apex Class or Trigger is there a difference between doing it through an IDE vs a destructiveChanges.xml? Does using destructiveChanges.xml purge the Class completely? What are the ...
2 votes
1 answer
66 views

In force.com IDE / eclipse: Is it possible to see a temporarily created destructiveChanges.xml when I delete metadata?

I use eclipse for deletions of layouts. Clicking through the UI it works just fine. But I have to do it over an over again on many orgs and now I want to automate that task with ant. Maybe I'm wrong ...
  • 33.8k
0 votes
0 answers
1k views

Cause :UNKNOWN EXCCEPTION, Invalid Cross Reference ID During ANT undeployCode

I am trying to remove a class from my QAT using destructive.xml ANT script and getting the following exception. Failed to process the request successfully. Cause(UNKNOWN_EXCEPTION): ...
3 votes
2 answers
1k views

What file structure is required when setting deployOptions.singlePackage to False

In using the metadata API to delete validation rules today, I ran into the issue described in this post, where i needed to set deployOptions.singlePackage to true, in order for the rules to get ...
  • 4,275
0 votes
1 answer
284 views

How to migrate a workflow trigger in salesforce xml?

how do I migrate a workflow trigger in the xml pacckage? For example, I can migrate a workflow Rule, next way: <types> <members>Opportunity.Update Opp Name</members> ...
3 votes
2 answers
2k views

Using Workbench to deploy destructive change set to eliminate apex class in production

I ran into an Apex Class error while trying to deploy a vendor package in Production from our partial Sandbox. The Apex class is obsolete and we have decided to delete it. Not having any developer ...
  • 31
1 vote
1 answer
87 views

Can you automate a release that changes the type of a field that is referenced by a class?

The problem In production we have a field that is referenced by a class. We want to change that field from a 'text' field to a 'formula' field. In order to change the field from one type to another ...
0 votes
1 answer
169 views

Trying to clear the unmanaged code in my Org using destructiveChanges.xml

I want to delete the unmanaged code present in my org using salesforce migration tool.While undeploying the components i'm facing a lot of errors like you cannot delete the following components as ...
  • 1
5 votes
4 answers
4k views

Deploying destructiveChanges.xml - Error parsing package.xml

Wondering if someone can help me with this. I'm trying to delete some components with the migration tool (Ant). However when I try to deploy, I'm getting the following error: *********** ...
  • 4,207
2 votes
2 answers
606 views

Unable to deploy destructivechanges.xml

I have a change set that is getting hung up on an old class that is no longer getting used so I want to delete it from our production environment. I have seen a bunch of posts on how to handle this ...
  • 1,092
10 votes
3 answers
4k views

Can you deploy "Tab Hidden" to a Custom Object on a Profile using metadata API? (tabVisibilities)

I have a custom object called MyCustomObject.object and a custom profile called MyCustomProfile.profile Currently the tab visibility of MyCustomObject is set to "Default On" for MyCustomProfile. <...
  • 351
2 votes
1 answer
786 views

Deleting page layouts with Andrew Fawcetts Deployment Tools?

Spinning up new orgs, our team is wasting a significat beef of time simply to cleanup the sample-data you get rolling into new vanilla orgs... Personally I think as partners we should get the option ...
  • 33.8k
14 votes
1 answer
13k views

Deleting custom object via destructiveChanges.xml and Metadata API deploy()

I've created a custom object in a developer edition org with the sole intention of deleting it via the Metadata API as per Deleting Components from an Organization. To do this I created the following ...
2 votes
1 answer
3k views

using metadata api to deploy destructive changes to delete custom fields

There is an issue that I would like to get some helps/advices. I'm creating a method in C# using Metadata API to deploy destructive changes to delete custom field as following: Create an empty ...
  • 23
5 votes
2 answers
5k views

DestructiveChanges.xml fails because component doesn't exist

I'm attempting to deploy a destructiveChanges.xml file. When I include <types> <members>Populate_Unit_Price</members> <members>Line_Item_Updated</members> &...
  • 1,854
6 votes
1 answer
680 views

Any way of resetting my development org to an empty state?

Is there currently any way to reset a salesforce development org to an empty state using the Migration tool. I am aware of destructiveChanges.xml but this seems to be giving me issues because of ...
2 votes
2 answers
238 views

Can destructiveChanges.xml be invoked directly from the Force.com IDE without Ant?

In a couple of old projects we have an Ant target setup to run a deploy with a destructiveChanges.xml file specified. AFAIK the Force.com IDE "Deploy to Server..." takes no notice of this - Ant has ...
  • 131k
11 votes
1 answer
4k views

Is it possible to delete a record type through Metadata API?

I'm deploying a destructiveChanges.xml file via Force.com Migration Tool to delete some listViews, Custom Fields, and Groups. I determined we also can remove some record types from Cases. I received ...
  • 1,854
3 votes
2 answers
4k views

How can I deploy and remove components in one step with the ant migration tool?

I am familiar with how to use the destructiveChanges.xml file to remove components from my org. But it seems like I have to deploy then delete or vice versa. Is there a way to set up a package so ...
  • 720
14 votes
1 answer
475 views

How can I delete a Development Package (not an Installed Package) programatically?

Under Setup > Create > Packages, I have deployed "packages" with prefix 033 Under Setup > App Setup > Installed Packages, I have installed "packages" also with prefix 033 I understand that it is ...
14 votes
5 answers
25k views

How to delete a class from production using destructiveChanges.xml

Can any one tell me the steps to delete a class using destructiveChanges.xml
  • 1,889
6 votes
4 answers
2k views

Ant Migration Tool deleting objects with Rollup Summaries

I attended the Dreamforce '12 session Team Development and Release Management for ISVs and one segment of the session was about the tools FinancialForce use for blanking an org before deploying a ...