-
Notifications
You must be signed in to change notification settings - Fork 78
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Inconsistency of schema generate field
command with core platform
#3066
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 |
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 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! |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
The text was updated successfully, but these errors were encountered: