Metadata from Sandbox always retrieved with latest API version instead of following sourceApiVersion
See original GitHub issueSummary
Metadata Retrieval from a Sandbox always uses the latest API version (right now, 45.0) instead of using the sourceApiVersion
specified in sfdx-project.json
.
Steps To Reproduce:
- Use an old API version in
sfdx-project.json
, for example:
{
"packageDirectories": [
{
"path": "force-app",
"default": true
}
],
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "43.0"
}
-
Authorize with a Sandbox
-
Right click on a custom object in the
objects
directory, clickSFDX: Retrieve Source From Org
Expected result
The retrieved custom object should have their metadata structure based on the sourceApiVersion
.
Actual result
The retrieved custom object has their metadata structure based on version 45.0. One thing that is easy to check is the existence of the enableLicensing
node in the metadata XML, which does not exist in version 43.0.
Additional information
VS Code Version: 1.34.0
SFDX CLI Version: sfdx-cli/7.6.0-28071a499b
OS and version: Windows 10/Arch Linux
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Metadata shown as modified When Pulled from Sandbox
When you make a retrieve with mdapi, all files are overwritten, and thus have their file-system's "modification time" audit field updated.
Read more >Flow | Metadata API Developer Guide
The active flow is the latest version. After you deploy changes to an active flow, the flow's detail page displays a new flow...
Read more >Develop Against Any Org with Visual Studio Code Tasks
Learn how to use Salesforce CLI and Salesforce Extensions for Visual Studio Code to deploy, retrieve, and delete metadata against any org.
Read more >@salesforce/cli - npm
Latest version : 1.41.0, last published: 12 days ago. ... restDeploy Whether deployments use the Metadata REST API (true) or SOAP API (false,...
Read more >CI and Delivery Using Salesforce Developer Experience
It simplifies integration with a version control system and helps build a better ... SFDX source format differs from Metadata API format.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just came across this issue. It’s pretty tough to deal with as the API version has a BIG impact and needs to be consistent across dev machines and CI environments.
@clairebianchi any chance this is in the backlog?
+1