New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VS Code drops leading zero in picklist field metadata values in a sandbox #3138
Comments
I was writting the same issue... There is a workaround :
TO MAINTAINERS : Please warn users when you set an experimental feature to on by default... |
Thank you @vincentducorps, that solved the problem. |
Reopening - this looks like a bug we need to address within the new experimental deploy retrieve. @vincentducorps It sounds like going forward we should use a different approach. Do you feel a one time dialog popup would have been better? We appreciate the honest feedback. |
This issue has been linked to a new work item: W-9118281 |
This issue has been linked to a new work item: W-9118282 |
i think the main issue is that the source-deploy-retrieve module is using the fast-xml-parser with not disabling the parseNodeValues option. So it tries to parse the node values in different kind of types like numbers and so on. i have modified my local version of the file and it works fine: node_modules/@salesforce/source-deploy-retrieve/lib/src/metadata-registry/sourceComponent.js from:
to
|
Thanks for pinpointing the issue @GULP-CM. We'll work on getting this fix published for next week's release |
Closing since this has been addressed in the latest release (51.11.0) |
Summary
I'm seeing picklist metadata problems with VS code and a regular sandbox (not a scratch org). I have a picklist where some values have leading zeros, e.g. "01", "02", etc. When I retrieve the field's metadata, the leading zero has been dropped in both the label and full name. Example: instead of "01" I get "1":
I need to commit and deploy this metadata with the leading zero.
Steps To Reproduce:
Expected result
Actual result
Additional information
VS Code Version: 1.55.1
SFDX CLI Version: sfdx-cli/7.93.1-762bca056d darwin-x64 node-v14.15.4
OS Version: Mac OS X 10.15.7
NOTE: I tried on a second machine with earlier versions of VS Code and SF Extension Pack -- it worked correctly. (I didn't make a note of the earlier version numbers.) When I updated VS Code and SF Extension to the latest version, then the leading zeros are omitted when the metadata is retrieved again.
The text was updated successfully, but these errors were encountered: