Query related to number sequence & Customization

Hi all,

I have a user requirement to customize inventTable form for BOM type & Item Type of item creation

e.g BOM type of item creation will be base on some parameters like some EDT and Enums etc. .

user will select these parameters on that basis BOM type of Item formation should happen.

above req. i have fullfill.

Now user want for Item Type of item, standard number sequence should use.

how to map this process? pls let me know if somebody know.

Thanks

Nitin

Hi nithin what you are looking for?Explain it clearly…

In standard the system will assign number to the Item - before selecting any Item Type.

that means when you create a record. So you need to tell the system that when you create a new record - it should ask for Item Type.

Based on the selected item type - you need to tell the system which number seq it need to take.

Try to override the create method of the form data source.

Hi Saju,

see there is three type of item type ITEM , BOM & Service

user want Item type of item creation will be on base of number sequence only which is available in Ax.

but for BOM type of item number seq. not needed , BOM type of item creation will be base on some parameter selection which i developed.

Regards

Nitin

Hi Kranthi,

there is need one no. seq. only for Item type of item

and for bom type user will select some values from EDT & enums on that basis bom type of item number will create.

Hi Nitin,

  1. For this you first enable number sequence for Invent Table. so for simple item you will get number as per number sequence.

  2. 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

Regards,

Mehul Thacker.

Hi Mehul ,

Your suggestion is very correct !

its working. Thank’x

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 related transactions ?

pls clear me if i’m wrong.

thanks again.

Regards

Nitin

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

Regards,

Mehul Thacker

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

.

Hi Mehul & Kranthi ,

Thanks for replay.

Mehul :- as u said…

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 ?

Thnaks
Nitin

we have creted own class to create item in inventTable through which we create BOM item & Item type of item.

Regards,

Mehul

Hi Mehul & Kranthi ,

My query get solved ! Thanks’

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.)

it’s working as I desired.

Thanks for ur help .

Regards

Nitin

Have you created one more number sequence to achieve this?

No.

there is only one number sequence of item type of item.

and for BOM type item user selected parameter i have passed.

Regards

Nitin