Scenario
Setting a maximum character length for a Rich Text and Text Area Custom fields is currently a limitation tracked under Enhancement 66573. As an alternate solution, create a Workflow that will return an error when the preferred character limit on a field is reached.
Solution
- Navigate to Customization > Workflow > Workflows > New
- Basic Information:
- Name: Enter WF Limit Character
- Record Type: Select Transaction
- Sub Types: Select Sales Order
- Execute As Admin: Enter Checkmark
- Release Status: Select Released
- Initiation: Select Event Based
- Event Definition:
- On Create: Enter Checkmark
- On View or Update: Enter Checkmark
- Trigger Type: Select -All-
- Contexts: Select User Interface
- Click Save
- Click State 1
- Bottom right corner: Click New Action
- Click Return User Error
- Basic Information:
- Trigger On: Select Before User Submit
- Condition: Select Custom Formula
- Formula: Enter !isValEmpty(nlapiGetFieldValue('fieldID').toUpperCase()) && nlapiGetFieldValue('fieldID').length>parseInt('5')
Note: Replace fieldID with the Field ID of the Custom Field. - Parameters:
- Text: Enter The maximum characters allowed on this field is only ___
- Click Save