Some CODEs are of length 10 only, your string happens to longer.
Which place exactly causes the error upon autoinsert in PO Header you may find examining the value NAV shows - knowing your system it shouldn't be difficult.
For me in ver3.70 the field "User ID" in PO Header table is a custom (locally added) field of type Code(20) - so its of little use for you
If you have some user(s) with IDs up to 10 chars in length, try logging in as such user and check if problem disappears - if so, you have 2 options: make all userIDs shorter to fit the lenght, or, change the length of this field in PO Header, but it can be done with full DEV license if it is a standart field (not in 50000.. range).
Use the Debuger in order to find the excaxt point that the error ocurs. There you will see the variable assigments that generate the problem in order to fix it
I agree it is probably best to turn the debugger on and try and find out where it is stopping. As the error indicates that there is a type conversion taking place - is it possible that maybe the wrong field has been specified in some code?
A common bug that I have seen in the past that throws this type of error is when there is custom code that is building a filter to check some value during a validation or form trigger.
You cannot delete a field on a table if the field has value on at least 1 record. I think you can change the field in order to make it bigger (form Code 10 to CODE 20).
If this is not possible try the following.
Make a new field on the TABLE with name xxx CODE 20.
Make a proccess only report and copy the value of the OLD field to the new field nad delete the value of the old field without Validating anything.
After that the OLD Field will be empty and the new field will have the old values.
Change the OLD Field to CODE 20. If it is not possible just delete the old field, save, make a new field with the ODL fieldID and save again.
change the proccess only report to copy back the values of your field.
Delete the empty field and you will be fine
I was able to create a customer with a name of 50 chars. But when I selected the same customer in Journal Voucher, I got this error. The Journal voucher description field and customer name field are of the same size. Then where could be the issue?
Comments
Which place exactly causes the error upon autoinsert in PO Header you may find examining the value NAV shows - knowing your system it shouldn't be difficult.
MCP, Dynamics NAV - Application
Do you think that the User ID Name should be reduced in length?
Thanks and Regards,
Beatrice.
So I do not think this is because of the User ID length.
Can it be because the User ID contains a "-"?
Thanks and Regards,
Beatrice.
If you have some user(s) with IDs up to 10 chars in length, try logging in as such user and check if problem disappears - if so, you have 2 options: make all userIDs shorter to fit the lenght, or, change the length of this field in PO Header, but it can be done with full DEV license if it is a standart field (not in 50000.. range).
Hope this helps,
MCP, Dynamics NAV - Application
by User Id what do you refer to ?
User ID is Code 20 in the standard tables etc: so these would not Error.
This error can be on the Header or Line, and likely to be at form level, it is trying to put your string ncahannac-rh into a code 10 field.
David
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
I suggested you found out that the abovequoted IS User ID.
If it is not, then you should investigate further, WHERE exactly NAV tries to insert this value in PO Header...
MCP, Dynamics NAV - Application
RIS Plus, LLC
MVP - Business Apps
A common bug that I have seen in the past that throws this type of error is when there is custom code that is building a filter to check some value during a validation or form trigger.
Epimatic Corp.
http://www.epimatic.com
With your help I found out that the User ID is being used in a table, which was added by us.
The User ID is defined with Code 10, that is why the system was giving this error.
I am not able to modify the User ID. Can I delete it and create a new one?
Thanks and Regards,
Beatrice.
If this is not possible try the following.
Make a new field on the TABLE with name xxx CODE 20.
Make a proccess only report and copy the value of the OLD field to the new field nad delete the value of the old field without Validating anything.
After that the OLD Field will be empty and the new field will have the old values.
Change the OLD Field to CODE 20. If it is not possible just delete the old field, save, make a new field with the ODL fieldID and save again.
change the proccess only report to copy back the values of your field.
Delete the empty field and you will be fine
I have modified the length of the USER ID field in the table from Code 10 to Code 20.
It is working fine.
Thanks and Regards,
Beatrice.
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog