-
Notifications
You must be signed in to change notification settings - Fork 183
Reduce field size #150
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
base: main
Are you sure you want to change the base?
Reduce field size #150
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,11 @@ | |
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<fullName>Order__c</fullName> | ||
<externalId>false</externalId> | ||
<fieldManageability>DeveloperControlled</fieldManageability> | ||
<fieldManageability>SubscriberControlled</fieldManageability> | ||
<label>Order</label> | ||
<precision>18</precision> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? This field is used in the framework's logic and is not related to an API name with limited length. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are right there is not a specific or hard limit here. However, the goal is to reduce storage size and reducing precision DOES make each record take up less space. I would argue that a precision of 18 is excessively large. No one will ever need to be able to order 100 trillion trigger actions (x1000 decimal places). I am proposing cutting storage space by 1/3 and limiting to 9999 actions without using decimals or 1 million if using the 2 decimals also. This should still leave plenty of breathing room to make your order values every 10 or even 100 to leave space in between for future actions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since every record is 2k of storage space the way Salesforce measures it, how does this change make a meaningful difference in anything? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dschach Because this is not an SObject record, it is a custom metadata type. For Custom Metadata types, every character DOES matter and does change the used storage against the 10MB global limit. https://help.salesforce.com/s/articleView?id=platform.custommetadatatypes_limits.htm&type=5 Relavent note:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I learned something; thank you. So the savings of 12 characters with an org limit of 10,000,000 is something that would be significant? |
||
<precision>6</precision> | ||
<required>true</required> | ||
<scale>3</scale> | ||
<scale>2</scale> | ||
|
||
<type>Number</type> | ||
<unique>false</unique> | ||
</CustomField> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will truncate data for anyone who is already using all 3 decimal places.
Let's keep it at 3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done