Options

Rename Item No

I created a report to rename the "No." field in the Item Table. Since this field is a primary key I used Rename function as shown below
mcxyp6q78fyu.png

I know my code is working as I tried it already for another Item No, but for this certain "No." I'm getting the following error
db74yv0fhc95.png

NAV Version
882hd54qvjax.png

Does anyone know how to resolve this issue?

Answers

  • Options
    AluanAluan Member Posts: 162
    edited 2022-06-02
    Hello mustafaAlsoufi,
    most likely the number is used in an Archived Order, that's why you get that message.
    I would enable the debugger and look at which position that error appears.
  • Options
    MariosopenaMariosopena Member Posts: 6
    Hi @mustafaAlsoufi, it seems that you have to modify the No. in the related order lines (remember to grant the proper table permission to your report as is an archived doc) before renaming your record. Make sure that modify code is triggered in order to modify item ledger entries as well in the rename trigger of the table.

    Hope this helps!
Sign In or Register to comment.