ERROR WHEN RENAMING CUSTOMER NUMBER

Hello,

I am getting a Navision error on renaming customer Number on customer table. There is no table relation between the two tables. Have checked, compiled, synchronized and done everything but still i cannot find the solution. Here is the error.

Lets take the new Customer No to be ‘Xxx’ and the other table ‘Yyy’

Cannot write value ‘Xxx’ to the field Customer No. in the table ‘Yyy’ because the value is either too long or the content is invalid.

export the customer to excel and delete the customer enter the customer information…

Hi Amos,
The easiest way to see if the is a table relation “hidden” in an object is to export the object to text, and search for table relations.

Then if you are absolutely sure there is no relation between your table Yyy and the customer table, then the answer could be found in custom code on the OnRename trigger in your Customer table. Have you checked this?

Hello Erik,
I tried all that, but I havent got any solution so far.

Strange. I’m sure that the table relation hides somewhere in your custom table.
Which version of Navision are you using?

2016

Which objects did you check?

I checked in the Onrename Trigger on CU 1 but it was blank. How can i Track down the custom code/table?

CU 1 as in codeunit 1?? You don’t find any table relations in codeunit 1.

As to how to find it in other objects, check my first reply:

“The easiest way to see if the is a table relation “hidden” in an object is to export the object to text, and search for table relations.”

Hi
You need to check the rename trigger of customer table as there might be some relation of another table has been defined.

Hello Enrik, I already did that more than enough.
There is none.

If you didn’t find it yet, then you didn’t do that “enough”…

Because it’s there. I guarantee you. Either as a table relation or as code on “a” Rename trigger. It doesn’t have to be on the customer table - but could be in any table, where you have used customer no. as part of your primary key.