Write necessary code which will not allow inserting item until "Inventory posting group" and "gen. prod Posting group" is not entered

Write necessary code which will not allow inserting item until “Inventory posting group” and “gen. prod Posting group” is not entered

please give me any solution

Best way Activate debugger and check for the same.

To Activate debugger go to tools–> Debugger–Active

This can be simply achieved by proper training…you can change the fore colour of mandotory fields and ask them to fill.

Make any new item default to “blocked”. Then OnValidate of the “Blocked” field add TESTFIELDS for your mandatory fields.

If one is blank it will not allow you to unblock the item. And if it’s blocked then it can’t be used. So your protected.

The change the NotBlank property to YES so it cannot be cleared out later.

OnInsert()
Blocked := TRUE;

Blocked - OnValidate()
TESTFIELD(“Shelf/Bin No.”);
TESTFIELD(“Vendor No.”);
TESTFIELD(“Net Weight”);
TESTFIELD(“Inventory Posting Group”);
TESTFIELD(“Gen. Prod. Posting Group”);
TESTFIELD(“Product Group Code”);

etc
etc