Some Notes about Multiline Text fields in Sage CRM.

1 minute read time.

I have written this article as a starting point for a discussion on the customization of Multiline Text fields in Sage CRM. Please feel free to comment as it will help me expand this article.

It is worth explaining a couple of points about field size and the display of data in Multiline Text fields. When you create a field of type 'Multiline Text' in Sage CRM it then gets created as field in the database. In Sage CRM all Multiline Text fields get implemented as the physical data type 'ntext' in an SQL Server database. NText is basically a 'one-size-fits-all' data type and can hold 1,073,741,823 bytes of data.

At sometime in the future Sage CRM will replace all the remaining usages of ntext with nvarchar(max) as ntext is being deprecated in the database. The process of changing the fields from using ntext started in Sage CRM v7.1. One of the fields that changed from an ntext field to an nvarchar field was the lead_details column in the Lead Table. This is still described as a Multiline Text entry.

Basically nvarchar(max) and ntext fields are experienced by the user in the same way. These are fields that allow us to enter free form text and consequently there is no 'size' for them. That is why we show a length '0' in the size column.

But the field size is not quite the same as Entry Width. Which can be set for the field. For example the Width for the oppo_note field is '50' and for the Lead_details is '30'. This Entry Width controls the width of the field displayed when in edit mode.

Sage CRM will automatically truncate all text fields, (nvarchar and ntext)to 255 characters when they are included in a List block. The truncation of Multiline Text data within the list blocks is done for display reasons and to keep the amount of HTML returned to the browser a reasonable size for performance reasons. The truncation does not take place within the SQL but is hard coded within the dll.