For this you first enable number sequence for Invent Table. so for simple item you will get number as per number sequence.
For bom type of item, you have create some code in that, add code to modify itemNumber for this BOM item after user have selected parameters. means from this parameters you will get one string, assign this string to Item Number field of BOM type item
In inventTable validwrite method i have override .
and one condition is added in an existing code if (this.ItemType==ItemType::BOM) if item type is bom then only parameter value will accept else it will take Number seq. value.
I have a doubt Item type number sequence format is different than BOM type of item.
hence , system was throwing an error “Number GTD044FRDH475JT does not match format ######.”
because number seq. length is 6 for item type item. and for BOM type its 15
Hence in class \ NumberSeq i have comment that code in four method like checkSetupReserve , checkChangeNumber,numCheckFormat, and numRemoveFormat. now its working as i required.
will commented code create problem for other number sequence relatedtransactions?
i dont have much experiance with NumberSeq class, but it sounds you are doing is NOT CORRECT!!
as you are modifying existing class that is used by all other number sequence so this is lead to “remove this all validation from all number sequence” understood??
so do something like that your modification will not affect to main NumberSeq. class
Validate Write will be called before the insertion of the record -that means the number sequence will be created before that - so i think writing it in the validate write is not correct.
If you comment that it will skip the validation of format of all the number sequences - never do that.
What you need to do is that you need to create one more number sequece for that.
See the Functionality available in assets-where the system will generate group wise or single sequence for all assets.
See Asset Table- in that modified method of AssetGroup field of the form data source…
we have implimented same what you are asking, diff number for bom item & its Bom line, you just use number sequence for BOM line item/item type item. and string you have created use it for BOM item.
just uncheck continue at number sequence you have used. no need to modify any number seq permission or any method in it
we have implimented same what you are asking, diff number for bom item & its Bom line, you just use number sequence for BOM line item/item type item. and string you have created use it for BOM item.
just uncheck continue at number sequence you have used. no need to modify any number seq permission or any method in it
if unchecked continues and remove the changes from NumberSeq ,system throw an error at the time of record saving.
’ Number 1OGC04HRYDKM6J does not match format ######."
Will you tell me from where you have pass string for Bom type of item , from which method ?
I have removed commented code from NumberSeq class ,
as you said If you comment that it will skip the validation of format of all the number sequences - never do that.
so right now there is no changes into NumberSeq class.
So to skip the validation format of Item number seq. only I debug program and find out there is need to comment only one line.
because it’s validating number sequence format between Item type of item ( Auto number seq.) and BOM type/parameterize string number. Item Type has 6 digit format and BOM has 15 digit string. That is why it was not allowing.
Commented line is “ ret = element.numberSeqFormHandler().formMethodDataSourceValidateWrite(ret) && ret; ”
Which is located at Form- InventTable --Datasource–InventTable—validateWrite
Now both type of item no. seq. are working fine.( auto number seq & BOM type parameterize string(Number seq.)