Why I can't open a journal with an error "Overflow under type conversion..." but I can import it

Hi everyone,

I have an COA account name with 53 characters, so I modify the G/L Account (Table 15) “Name” field length to 60. In order to import general journals with dataport, I modify the Table 81(General Journal Line) “Description” field to length 60.

During the data import, there is no error, But after I click on the corresponding journal line with that long account, an error occurs, saying “Overflow under type conversion from text to text. Value:…(Long account name)”. Before I click it, I have no idea that there’s such an error.

I checked the code of Table 81(General Journal Line), find this in “Account No.” " onValidation" part.

Description := GLAcc.Name;”

Therefore, I tried to add the following code, but the situation doesn’t change.

“MyJournal.Description:=COPYSTR(MyJournal.Description,1,50)”,

Is there any way to solve it without shortening the COA account name? I have tried to set G/L entry table description to lengthe 60 as well, it doesn’t work either. I don’t know how to debug it without error in runing dataport…

Thanks very much.

Welcome to DUG.

I never suggest to Increase the field length because the above case is one example.

You are going to get this kind of message whenever you are trying to deal with that gl account like in reports/posting etc.

I suggest you to remove your changes and use a different methodology.

Thanks very much.

Then would you kindly give some suggestions on what other methodology can I use if the client insist to have a full view of account name?

You can create new filed (Name 2) and save the extra name which is more than 50 characters in new field.

You can read this blog you will understand why not to increase standard field length.Whenever my developer ask me for increasing the length of standard field I told him to read this first.

http://dynamicsuser.net/blogs/singleton/archive/2009/07/17/increasing-field-lengths-in-navision.aspx

Thanks very much.

I add name2 field in G/L account table, description2 field in Gen. Journal Line Table.

Then after I add description2 field in G/L entry Table, is there any method to fill in this entry description2 without codeunit edit permission and G/L entry edit permission? Thanks very much.

You need to write code in table 81 Gen. Journal Line when you have entered GL Account.

Please contact your Partner or senior who can do this…