Questions tagged [destructivechanges.xml]
The destructivechanges.xml tag has no usage guidance.
54
questions
0
votes
1
answer
15
views
How does one delete a CompactLayout via mdapi?
I have a descructiveChangesPost.xml file to delete any components no longer required to which I've added a section for CompactLayouts, but it's not doing the delete. Is it not possible to delete these ...
0
votes
0
answers
121
views
How do I resolve this deployment "fatal error?"
I receive the below "fatal error" running a deployment to a dev sandbox that includes destructive changes. The error occurs after tests run:
EntityObject can not be initialized with null ...
0
votes
0
answers
50
views
GitLab pipeline template which includes pre & post destructive changes
I have read through the Q&A. There are links pointing to the GitLab YAML template here and this outdated blog where trailhead no longer there. The lack of documentation for this GitLab integration ...
0
votes
0
answers
90
views
How to delete custom field translations when deleting the field?
I've deleted a custom field, and pushed that to my scratch org, but now I can't delete the corresponding translation:
$ rm package/main/default/objects/Opportunity/fields/MyField__c.field-meta.xml
$ ...
1
vote
1
answer
521
views
How can I delete LWC using SFDX in VS Code?
I've retrieved my LWC source from the org, and then tried right clicking on the component folder in VS code (under force-app\main\default\lwc) and clicking SFDX: Delete from Project and Org, which ...
1
vote
1
answer
155
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" --...
5
votes
1
answer
6k
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
321
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 ...
2
votes
1
answer
4k
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
199
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-...
0
votes
0
answers
147
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
87
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: ...
1
vote
1
answer
110
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
1k
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 ...
1
vote
1
answer
233
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 ...
0
votes
1
answer
552
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
1k
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
1k
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
404
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
143
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
735
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 ...
1
vote
1
answer
825
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 ...
4
votes
1
answer
1k
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; ...
0
votes
1
answer
2k
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 ...
4
votes
1
answer
860
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
668
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 ...
4
votes
1
answer
1k
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"?>
<...
0
votes
1
answer
4k
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 ...
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 ...
4
votes
1
answer
150
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}"
...
0
votes
0
answers
344
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: ...
1
vote
1
answer
331
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 ...
0
votes
1
answer
67
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 ...
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
2k
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 ...
0
votes
1
answer
303
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
3k
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 ...
1
vote
1
answer
105
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
191
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 ...
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:
*********** ...
2
votes
2
answers
648
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 ...
10
votes
3
answers
6k
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.
<...
1
vote
1
answer
827
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 ...
15
votes
1
answer
15k
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 ...
5
votes
2
answers
6k
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>
&...
6
votes
1
answer
693
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 ...
11
votes
1
answer
5k
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 ...