Skip to main content
13 votes
Accepted

Simple way to diff a file in local SFDX project against Production version with SFDX

VS Code has an option to detect conflicts on deployment for non-source-tracked orgs. Go to Settings > Salesforce Feature Previews > Salesforcedx-vscode-core: Detect Conflicts At Sync. Note that ...
sfdcfox's user avatar
  • 495k
8 votes

How can I get better diffs when looking at Salesforce metadata

This answer is relevant to Salesforce metadata and also to anyone dealing with large blocks of XML or similar repetitive text. When working with large files in version control, especially large XML ...
abd3721's user avatar
  • 2,162
6 votes

Simple way to diff a file in local SFDX project against Production version with SFDX

Have you tried using the Salesforce official Diff Feature on the Extension Pack for Salesforce https://developer.salesforce.com/tools/vscode/en/user-guide/source-diff/ From the terminal, run sfdx ...
Mohith Shrivastava's user avatar
5 votes

Find record diff between two dates in Apex (to minimize API calls)

Field History Tracking is the most obvious choice, but comes with significant caveats: Several field types that can't be tracked: formula, roll-up summary, auto-number, created by, last mod by, AI ...
Thomas Taylor's user avatar
4 votes

How to compare the diff between 2 orgs with sfdx?

The UI command only works to diff the local repo to an org. To compare two orgs, retrieve both, then use a tool like diff or WinDiff to check the differences: sfdx force:mdapi:retrieve -k manifest.xml ...
sfdcfox's user avatar
  • 495k
2 votes

Simple way to diff a file in local SFDX project against Production version with SFDX

After installing the sfdx:source:diff tool from @Mohith Shrivastava's response, you can use the --json flag to return the locations of the remote and local files that VS Code uses to diff. You can ...
bbbco's user avatar
  • 121
2 votes
Accepted

What is the recommend way to diff local vs remote conflicts/changes in Salesforce DX?

As far as I understand, when Salesforce released SFDX they did it to provide a way for developers to easily integrate a Version Control System (VCS) in their development cycle, as well as many other ...
Javier García's user avatar
2 votes
Accepted

sf project deploy preview shows conflicts, but files are identical

Source tracking works by grabbing the last modified time stamp from the file when you do a pull or push, and also tracks the timestamps of the local files. If the last known time stamp on the server ...
sfdcfox's user avatar
  • 495k
1 vote
Accepted

How to retrieve last modification time of files stored in Org?

The metadata retrieve API doesn't include timestamps of the metadata. Use sf org metadata list or sf data query --use-tooling-api if you want this kind of metadata.
sfdcfox's user avatar
  • 495k
1 vote
Accepted

How to Diff Entire Org (list of changed files) in VSCode?

I've never used that VS Code / SFDX feature, but here is what I usually do - Create a local git repository if you don't already have one (git init) Commit the latest changes Set your package.xml file ...
Wes Lyons's user avatar
  • 336
1 vote

How to compare the diff between 2 orgs with sfdx?

You may also try sforgcompare to compare the orgs.
ManishG's user avatar
  • 390
1 vote

Find record diff between two dates in Apex (to minimize API calls)

Maybe this Summer'19 improvement can help you : we can make an async trigger with Change Data Capture https://developer.salesforce.com/blogs/2019/06/get-buildspiration-with-asynchronous-apex-triggers-...
Mael Monnier's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible