Form # 30 - Where do the default values come from/how to change??

I am working on Form # 30 - Item Card and the defaults that show up when entering a new part. Some of the defaults that show up when you enter a new part we want changed to another value.

Gen. Prod. Posting Group is one of them.

I have checked the table design, form property, form field propery, the CAL-Code and I see nothing that is pushing these values into the form. I have checked for Codeunits and their not pushing anything into these fields.

Where is this info. being pushed from??

Very frustrating,

Thanks in advance,


Hi Greg,

Did you check the Initvalue on the property of the fields on the table or if a template is being applied?

Open the customer card, turn on the debugger, and hit F3. Step through the code to see if you can find where C/AL code changes that value. Then when you get control back to the customer card, hit enter (inserting the record) and step through that process. It comes from somewhere, you just need to figure out where.

When I enter a new part and put something in the Item Category Code than it bangs in the Gen. Prod. Posting Group. I think it has to do with table 5722.

Thanks for pointing me in the right direction. I’ll have to play with the debugger.


Just go Inventory Setup / Item Category codes…There are lots of default settings in Item Category Codes - check if you have all columns “unhidden”.

Of course, its not the only place from where default values come to Item - but previous answers already gave you some ideas.

Ah now you’re making more sense (plus I got the sand out of my eyes and realized you were talking about Items not Customers). The Gen Prod Posting group defaults from the Item category, and the code that does this is in the OnValidate of the Item Category code in the Item table. Open the item table in the table designer, find the Item Category field and hit F9.

Note where it says this:

IF “Gen. Prod. Posting Group” = ‘’ THEN
VALIDATE(“Gen. Prod. Posting Group”,ItemCategory.“Def. Gen. Prod. Posting Group”);

If you set the posting group before setting the item category code, it should leave the original value alone. It only sets it when the PG is blank.

Thanks Daniel.

That’s what I was looking for.


My pleasure Greg, always happy to help. Sorry for the initial misunderstanding.