Edit item code for serial number


We just started to use ERP Next few weeks ago and are still learning the system.

One of our users imported some serial numbers for a specific item (which is actually a variant of an item). And we made a stock entry (material receipt) for these serial numbers (and some others).

In fact these serial numbers were corresponding to an other variant of this item. So, I now would like to edit these serial numbers to update the item code by the right one. But I can’t do that.

Anyone could help me ?

Thanks in advance,


Welcome to ERPNext vg-scarlier

What you are describing relates to this https://erpnext.org/docs/user/manual/en/setting-up/settings/naming-series

‘I now would like to edit these serial numbers to update the item code by the right one’

Typically a naming_series cannot be changed once it is initially set, at least not at the GUI level. You may have to update records in your database. A mistake here can compromise its integrity…

Hi clarkej,

Thank you for your answer. I understand that we need to get a validation process before submitting.

What I finally did is the following :

  • Material issue to remove SN from stock
  • Bulk rename to edit SN by something like ERROR-SN
  • SN creation with correct item code



So you will use this tool Sebastien?


Be sure to use a test environment or copy of production, save a backup of your database or snapshot of your VM and so on.

A brief report of your learnings to let us know how that goes would be instructive, please and thanks.