Some companies require their Custom Decimal fields to be rounded. Unfortunately, this is currently a limitation of custom fields.
On a brighter note, we've come up with a workaround. In this article, we'll be guiding you on how to do this which will be utilizing another Custom Field and a Workflow.
Scenario:
You have a Custom Decimal Field on your Inventory Item and you wanted it to be rounded up:
Create the Custom Field:
Navigate to Customization > Lists, Records, & Fields > Item Fields > New
On the Custom Item Field page, input the values below:
- Type: Decimal Number
- Store Value: No
- Formula: Yes
- Default Value: ROUND({custitem15},1)
Note: Input the ID of your original Custom Field here. In my case it's custitem15.
Once you're done creating the field, it should now look like this:
Create the Workflow:
Navigate to Customization > Workflow > Workflows > New
On the Workflow page, input the values below:
- Record Type: Item
- Sub Types: Inventory Part (Select any applicable sub type in your use case)
- Execute as Admin: Yes
- Release Status: Released
- Keep Instance and History: Yes
- Enable Logging: Yes
- On Create: Yes
- On View or Update: Yes
Create 2 Set Field Display Type actions:
Navigate to State 1 > New Action > Set Field Display Type
On the First action:
- EventTypes: View
- Field: <Your original field>
- Display Type: Hidden
On the Second action:
- Display Type: Edit
- Field: <The field we just created>
- Display Type: Hidden
Results:
On Edit mode, it should now hide the newly created field and show the original field as seen below:
On View mode, it should now hide the original field and display the newly created one as seen below:
Now you know how to round off your Custom Decimal Fields! I hope this helps! 😁
Want to learn more about Customization? Visit New to NetSuite: SuiteBuilder & SuiteBundler
Do you have any feedback? Let us know in the comments!