Item code customisation

We have a customised Wizard for Item code creation. What it does is

Step1 It will show the Item Group , assume user selected G1

Step 2 It will show the following customised fields (Product Group fields)

Product Group A, say user selected PGA

Product Group B, say user selected PGB

Product Group C, say user selected PGC

Also it will show the Tracking Dimension, Purchase Unit, Selling Unit and few Mandatory fields needed for creating the Item. Once all the inputs are completed, and we click on Finish, System Automatically generates the new Item code as follows

G1-PGA-PGB-PGC-0001

This is working fine.

What I need is a change in the logic of generating Item code.

The new coding structure which I need is “Item Group-0000”. Each Group will maintain the Numbering separately

e.g. if the user selected G1 , then code is G1-0001

next time if the user selected Item group as G1 , then code is G1-0002, and so on.

e.g. if the user selected G2 , then code is G2-0001

next time if the user selected Item group as G2 , then the code is G2-0002 and so on.

To cut short, whenever we create a new Item, System should check which Item Group, the user has selected and check existing items for the Last number used by the same Group and increment it by one and Generate the new code.

Hope this is clear

Regards

Thomas Philipose

So what’s your question?

My question is what code shall i write in the Finish button click, so that i can create a new record which has the Item code logic mentioned above.

I’m not sure if you find anybody to do the whole work for you. But if you have a particular problem to discuss, feel free to raise it.

If you don’t want to use a number sequence, just implement what you’ve described. You’ll find the highest ID beginning with the given group ID, extract the number and increment it.

Note that your numbering scheme won’t make much sense if you allow changes of item group.

Thanks

I understood your point regarding change of Item Groups. Will take care of this.

Regards

Thomas Philipose