Questions tagged [destructivechanges.xml]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
18 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 ...
user avatar
  • 79
0 votes
1 answer
97 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 ...
user avatar
1 vote
0 answers
75 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 ...
user avatar
  • 4,203
2 votes
1 answer
282 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?
user avatar
0 votes
0 answers
388 views

Delete inactive picklist values using Metadata API - destructive package xml

I am trying to find a way to delete some picklist field values using Metadata API. My initial thought was to remove from the Metadata file and deploy it. However, the picklist value that I removed ...
user avatar
  • 4,521
0 votes
0 answers
34 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-...
user avatar
0 votes
0 answers
43 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 ...
user avatar
0 votes
1 answer
52 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: ...
user avatar
  • 123
1 vote
1 answer
43 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 ...
user avatar
0 votes
0 answers
32 views

How to completely delete Flow from Org with destructiveChanges? [duplicate]

I'm trying to completely delete Flow from my Org (all versions etc.) with destructiveChanges. However, when flow is added to destructiveChanges, I get the following error: Insufficient access rights ...
user avatar
  • 332
0 votes
1 answer
290 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 ...
user avatar
  • 3
1 vote
1 answer
93 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 ...
user avatar
  • 461
0 votes
1 answer
124 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 ...
user avatar
0 votes
2 answers
386 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 ...
user avatar
0 votes
2 answers
464 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&...
user avatar
0 votes
0 answers
137 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 ...
user avatar
1 vote
1 answer
76 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 ...
user avatar
0 votes
1 answer
413 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 ...
user avatar
0 votes
1 answer
353 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 ...
user avatar
  • 2,713
4 votes
1 answer
658 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; ...
user avatar
  • 9,436
0 votes
1 answer
857 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 ...
user avatar
  • 341
4 votes
1 answer
610 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 ...
user avatar
0 votes
2 answers
1k 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: <...
user avatar
0 votes
1 answer
379 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 ...
user avatar
  • 2,713
4 votes
1 answer
716 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"?> <...
user avatar
  • 341
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 ...
user avatar
  • 168
1 vote
1 answer
1k 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 ...
user avatar
  • 11
4 votes
1 answer
112 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}" ...
user avatar
  • 427
0 votes
0 answers
266 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: ...
user avatar
  • 187
1 vote
1 answer
290 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 ...
user avatar
2 votes
1 answer
64 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 ...
user avatar
  • 33.5k
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): ...
user avatar
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 ...
user avatar
  • 4,203
0 votes
1 answer
273 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> ...
user avatar
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 ...
user avatar
  • 31
1 vote
1 answer
81 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 ...
user avatar
0 votes
1 answer
165 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 ...
user avatar
  • 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: *********** ...
user avatar
  • 4,207
2 votes
2 answers
591 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 ...
user avatar
  • 1,072
10 votes
3 answers
3k 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. <...
user avatar
  • 351
2 votes
1 answer
767 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 ...
user avatar
  • 33.5k
14 votes
1 answer
12k 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 ...
user avatar
2 votes
1 answer
2k 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 ...
user avatar
  • 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> &...
user avatar
  • 1,844
6 votes
1 answer
672 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 ...
user avatar
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 ...
user avatar
  • 129k
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 ...
user avatar
  • 1,844
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 ...
user avatar
  • 720
14 votes
1 answer
474 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 ...
user avatar
13 votes
5 answers
24k 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
user avatar
  • 1,849