Closed k-capehart closed 1 month ago
Hello @k-capehart :wave: None of the versions of sf
you shared match the latest release.
Shared: 2.61.8
Latest: 2.62.6
Update to the latest version of Salesforce CLI (docs) and confirm that you're still seeing your issue.
You can also try the rc
and nightly
releases! (docs)
After updating, share the full output of sf version --verbose --json
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.
Thanks for the PR @k-capehart! I'll run this by the team and get back to you
@k-capehart - Thanks for engaging with us and sharing your perspective.
I see your point about consistency. I also agree that "no spaces" should be the standard in the UX.
Unfortunately, the monthly usage of schema generate
commands is too low to prioritize changing the CLI.
I'm going to close this for now, but will revisit it if usage increases. Thanks!
@VivekMChawla Thanks for the response. Does the fact that I've already submitted a PR change your perspective on priority? It would just need approval, and it's small.
Either way, I appreciate it!
@k-capehart - The problem isn't just the engineering work. We'd want to confirm with the broader community that we're not breaking anyone by this change in behavior, then be on the lookout for complaints if we do.
Even though the number of users is small, the due diligence on our part is enough that I can't justify the change given other priorities. I'm sorry.
No worries, thanks for the added context!
Summary
There is inconsistency when creating new fields in Salesforce via the CLI and via the UI.
In the UI, the default API name autopopulates after entering the label. Spaces are replaced with underscores. (i.e. Test_Field__c)
In the CLI, spaces are removed in the default value. (i.e. TestField__c)
When I run this command, I want to be consistent with my naming conventions without having to manually write the API name each time.
Steps To Reproduce
sf schema generate field -l "Test Field" -o force-app/main/default/objects/Acount/
Expected result
The default API name for a new field created via
schema generate field
should be consistent (replace spaces with underscores).Actual result
The default behavior removes spaces.
Additional information
PR created: https://github.com/salesforcecli/plugin-sobject/pull/752
However, I am open to discussion on this. I almost prefer no spaces, but I like consistency better.
System Information