Skip to content

almc-c/Salesforce-CLI-Scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Salesforce-CLI-Scripts

Various SFDX cli / bash scripts for interacting with Salesforce data or metadata

Generate Manifest Script Objective:

If you need to determine what metadata is found in one org but not in another, you may use this script. This does not, however, inform differences in the contents of those metadata. The code --diff method performs a text based diff and does not depend on git commit history, branches nor states. This is helpful when working on orgs regardless if org-based or git-based deployment strategy.

In order to compare differences in those metadata, each specific metadata will need to be retrieved with another cli call project retrieve start. This can be done, but with the 10,000 metadata item limit of a retrieve in Salesforce, you will need to break this up into chunks of metadata types if the retreived metadata is too large. I.e. Retreive all custom objects. Then retrieve all APEX classes. If you do not need custom packages, avoid namespaced metadata, except for those you may extend and augment, such as managed package picklists.

References:

https://help.salesforce.com/s/articleView?id=platform.devops_center_setup_seed_repo_generate_manifest.htm&type=5 https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_quickstart_retrieve_use_retrieve.htm https://sfdx-hardis.cloudity.com/hardis/org/monitor/backup/

Pre requisites:

Compare information (metadata) found in source vs target environment:

sf project generate manifest --output-dir manifest --name=allMetadata-dev --from-org dev

sf project generate manifest --output-dir manifest --name=allMetadata-test  --from-org test

sf project generate manifest --output-dir manifest --name=allMetadata-prod  --from-org prod

now text diff compare manifests:

# VS Code will present side x side the differences, highlighting added or missing metadata between the two org manifests as "existence checks"
code --diff ./manifest/allMetadata-dev.xml ./manifest/allMetadata-test.xml

About

Various SFDX cli / bash scripts for interacting with Salesforce data or metadata

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages