Tuesday, March 5, 2019

How to calculate length of a characters in a free form textfield

To calculate the length of a free form text field try using the formula below :
  - nlapiGetFieldValue('xxx').length // xxx is the internal id of the field.

One situation where the above formula can be helpful is to use it in regards with a condition based action within a workflow.
  - WF Action : Return User Error if "Company Name" is greater than 30 characters :  nlapiGetFieldValue('companyname').length>parseInt('30')

No comments:

Post a Comment