28th February 2014
As you probably know NAV has a limit on the length of text field size. It is set at 250 characters. There are scenarios where the client needs to store more data that is longer than 250 Character. If you look at any website that sells items, you’ll see detailed description that is made up of many paragraphs. In older version of NAV, partners were using the following solutions. They stored the data in blob field and opened the data to be edited in external application, e.g. Notepad, or automation, e.g. WaldoPad. The problem with this issue is that you need to install the automation on each machine and support it.
The other solution was to store it in text field but split the data across multiple records. For example in the comment line table or Extended Text line table. The problem with extended text or comment line is that editing these data becomes harder. If you changing a line in the middle of the paragraph then the all the lines bellow need to be moved as well.
The third solution is a mix of the two solutions above where you allow doing the editing in external application or automation and splitting the data and storing it in the table.
In NAV 2013 NAV has still the text field size limit, but there is no limit and text data type. You can create a text variable and add as much data into it and display set the source expression of a text box to the text variable and the user can modify it like a paragraph. Then at the end you can store the data either into a blob field or split the string into a table. The advantages of this solution is that you are not using any external application or COM component and you are doing it all within NAV.
Below is a demo solution that you can use in your projects and replace existing solution if you are upgrading.
In this demo I’m going to use the first record in Item table and store the data. Either in Comment line or Picture field, which is a blob field. You can change it based on your requirements and use one or the other solution to store the data.
Here is the link to the object. It is 2013 R2 object but can be implemented in 2013 as well.