Checkboxes in a grid

i added a NoYes enum checkbox field in the PriceDiscTable (trade agreement) grid. the grid can hold more than one record for one Item id. i want to restrict the user to choose only one checkbox per itemid, so that checking the box for an item id record will uncheck the box of any other record of the same item id.

i appreciate any solutions to this or alternative work arounds :slight_smile:

Hi Lola,

To restrict user to check more than one check box, u can put ur code in validateWrite() at table level, so that, if user checks another record of same itemId, u can prompt user that there is already selected line for that item.

To automatically, uncheck other checkBoxe, on clicking checkbox for same item, u can put code in modifiedField() at table level.

Hope it helps…

can you please give me a hint about how the code would be? if/else or a switch? i’m kind of new to X++ :slight_smile: