Make the schema generate field
command consistent with Setup behavior.
#3067
Replies: 7 comments
-
Hello @k-capehart 👋 None of the versions of Shared: Update to the latest version of Salesforce CLI (docs) and confirm that you're still seeing your issue. After updating, share the full output of |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the PR @k-capehart! I'll run this by the team and get back to you |
Beta Was this translation helpful? Give feedback.
-
@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 I'm going to close this for now, but will revisit it if usage increases. Thanks! |
Beta Was this translation helpful? Give feedback.
-
@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! |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
No worries, thanks for the added context! |
Beta Was this translation helpful? Give feedback.
-
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: salesforcecli/plugin-sobject#752
However, I am open to discussion on this. I almost prefer no spaces, but I like consistency better.
System Information
Beta Was this translation helpful? Give feedback.
All reactions