Hi, the lines are the easy part. Sales Order Subform has the shortcut dimensions as controls already, so in a page extension you modify the one for dimension 5 and put Editable = false. I think it's called ShortcutDimCode5, check in your version. The header has only dimension 1 and 2 in standard, so Tender No. there is your own control, same thing, Editable = false. Your code can still fill it, this blocks only the user.
But honestly, this won't stop anybody who wants to change it. They open Dimensions on the header or the line and edit it there. We had exactly this on a client, the field was locked on the page and the values were still wrong at month end.
Glad to help - follow up if anything is unclear.
► If this solved it, marking it verified helps others too.
Regards,
Grigorios Mavrogeorgis
Business Central Consultant & AL Developer
Work: Gmsoft Limited
Blog: insidebusinesscentral
LinkedIn: linkedin.com/in/gregorymavrogeorgis