AL icon indicating copy to clipboard operation
AL copied to clipboard

Unbound controls on page are always editable

Open larswestman opened this issue 8 years ago • 3 comments

Controls not bound to a field in the record stays editable regardless if the page is in edit or view mode. At least if PageType = Card. Haven't tried other page types.

"platform": "13.0.0.0", "application": "13.0.24623.0", AL Extension: 2.0.48254

larswestman avatar Oct 18 '18 11:10 larswestman

I'd suggest playing with different page types as a workaround, Card Plus, Worksheet, Document.

Be careful with Lists though, as often a variable will have values saved per record, and to get around that I usually send the value back and forth to a codeunit just to store and retrieve it so it remains static.

Frantic42 avatar Oct 22 '18 07:10 Frantic42

(sorry if posted twice; somehow GitHub does not display correctly for me today)

This is old behaviour since NAV Windows Client days. Simply create a new global variable (e.g. Named DynamicEditable) and assign it to the Editable property of your page field(s).

Set the variable like this:

OnAfterGetCurrRecord()
DynamicEditable := CurrPage.EDITABLE;

NKarolak avatar Oct 22 '18 11:10 NKarolak

You're absolutely right :-) Thanks!

larswestman avatar Oct 22 '18 12:10 larswestman