How to lock all lines from further editing with clicking on button on the from in d365fo x++

after i entered value in field in the line , and i press confirm button all lines should be locked and forever

Add a logic to active() method of the form data source which will check whether the record is confirmed. If so, set, set false to allowEdit() method of the data source. It could look like this:

boolean isConfirmed = myTable.Status == MyStatus::Confirmed;

and what about clicked method on button controll?

There you’ll confirm the record, which needs to change the status.

1 Like

thank you very much for your help is much more clear now