Loading...
Loading...
Execute the destructiveChanges.xml delete-and-deploy workflow against a Salesforce org. TRIGGER when the user asks to delete/remove a custom object, field, Apex class, flow, or any metadata component FROM an org, or to perform a 'destructive deploy' / removal as part of a release. Validates first and gates production with explicit confirmation. DO NOT TRIGGER for local file deletion (use Bash), or for net-new deploys (use platform-metadata-deploy).
npx skill4agent add forcedotcom/sf-skills platform-destructive-deployCustomObjectCustomFieldApexClassFlowPermissionSetProject__cAccount.Status__cMyControllerforce-app/grep -rn "<componentApiName>" force-app/ --include='*.cls' --include='*.trigger' --include='*.xml' --include='*.js' --include='*.html'destructiveChanges.xmlmanifest/destructiveChangesPre.xmlmanifest/destructiveChangesPost.xml<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Project__c</members>
<members>OldThing__c</members>
<name>CustomObject</name>
</types>
<types>
<members>Account.Status__c</members>
<name>CustomField</name>
</types>
<version>62.0</version>
</Package>sfdx-project.jsonsourceApiVersion<types>Object.Fieldsf project deploy validate \
--pre-destructive-changes manifest/destructiveChangesPre.xml \
--manifest manifest/package.xml \
--target-org <alias> \
--test-level RunLocalTests \
--json--post-destructive-changespackage.xml<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<version>62.0</version>
</Package>production|sandbox|scratch|trial|devhub|unknownsf org display --target-org <alias> --json | "${CLAUDE_PLUGIN_ROOT}/scripts/sf-deploy-gate" classifyproductionplatform-quick-deploy--purge-on-deletesf-deploy-gate destructivesf project deploy start \
--pre-destructive-changes manifest/destructiveChangesPre.xml \
--manifest manifest/package.xml \
--target-org <alias> \
--json \
--wait 30--purge-on-deletesf project retrieve start --metadata <Type>:<Name># Remove the now-deleted local files to keep source tracking accurate
rm -rf force-app/main/default/<path-to-component>--purge-on-delete--ignore-errorssfdx-project.jsonrequired="true"RecordType