Dear All,
I'm tring to rename the item code for 3700 items, So I made a codeunit to do the following:
OnRun()
itemrec.FIND('-');
REPEAT
itemrec.INIT;
itemrec.RENAME(itemrec."No." + 'V');
UNTIL itemrec.NEXT = 0;
Do you have another code to do the same result.
Comments
When I'm used the following Code.... Nothing Happend.
Please note that Item Code is a numbers.
Please advise
Dynamics NAV Developer
what about that?
Also as far as i know, the Primary key in item table is No with type Code.
Please advise
Dynamics NAV Developer
items before rename :
01
02
03
renaming 01 to V01 will give you
02
03
V01
So if ItemRec.No was '01', and ItemRec.No is 'V01' after rename, ItemRec.NEXT cannot find any more records.
try this: or this
Don't forget set proper filters on itemrec."no."
Regards,
Slawek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
thanks alot
Dynamics NAV Developer
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!