General X++ Development
How do I enable or disable a form control in X++?
How do I enable or disable a form control in X++?
1 answer
Write an answerFor an unbound control:
YourControl.enabled(canEdit);For a field that is bound to a datasource, I usually control the datasource field instead:
MyTable_ds.object(fieldNum(MyTable, MyField)).allowEdit(canEdit);That way you are controlling the field itself instead of only one visual control that happens to display it.
Know the solution?
Sign in to contribute an answer and build your community reputation.
Sign in to answer