Tuesday, May 21, 2013

Text variables of unlimited length


At the time of the Beta release of Dynamics NAV2013 they promised us unlimited length of text variables but I never found out how? Today I stumbled into a blog where it was explained.
So the text variables can have unlimited length in Dynamics NAV2013! That’s quite a leap ahead of the previous versions which couldn't handle more than 1024 characters per variable. If you wanted to achieve bug-free code then, when you were assigning texts around, you had to concatenate the result down to the MAXSTRLEN of the target text.
The trick is to simply not declare the Length property on text variables. If you declare a variable of type Text, and then leave the Length empty, it means – unlimited. It's even implemented at the function variable level!

However there is one big limitation they didn't implemented it on the tables there is still a limit on 250 char's. 

No comments:

Post a Comment