Coder Social home page Coder Social logo

albertomata / testing-component-deletion Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 9 KB

A POC project to deploy and delete components in a Salesforce organization using the Salesforce CLI.

Home Page: https://alberto-mata.medium.com/removing-deprecated-metadata-using-the-salesforce-cli-e434c268f257

License: MIT License

Apex 83.95% JavaScript 5.98% Shell 10.06%
salesforce-cli salesforce-devops salesforce-metadata

testing-component-deletion's Introduction

TestingComponentDeletion

Deploy metadata

This repository pretends to show a small dependency tree that can be easily deployed and removed from your developer org.

You can deploy this repository from vscode using the Salesforce extensions for Salesforce DX. Or you can add executable permissions to the shell script found at ./scripts/sh/deploy.sh.

chmod +x ./scripts/sh/deploy.sh

Notice that you need a correctly set up organization in your project scope, preferably a developer org. That way, sfdx can determine by itself which user you are using to perform the deployment. Then run the following script:

./scripts/sh/deploy.sh

Removing components

To delete deprecated components from your organization, execute the following command:

sfdx force:mdapi:deploy --deploydir deprecationManifests \
--testlevel RunSpecifiedTests \
--runtests MOCKED -w 3

Considering that ExtraObject__c is a component that will remain, confirm that this is the case once you run the command. Then you can delete it manually or adding the type member to the file destructiveChanges.xml and executing the previous command again.

Considerations

All the commands listed here were executed with sfdx-cli version sfdx-cli/7.99.0 wsl-x64 node-v12.22. In order to run these commands in other systems like Powershell, you may need to perform extra configurations.

testing-component-deletion's People

Contributors

albertomata avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.