First I know how to set the editable/visibile property of a field on a page that is NOT what I am asking.
Am I missing something basic about extensions?
It is a common request from our users that based upon some business logic one or more fields on a page need to have their editable/visible property set (true/false). How can I do this as part of an EXTENSION?
In order to set the editable/visible property you must use code to to set a Boolean variable. First rule of extensions is "DO NOT make C/AL code modifications". So if you can't modified the code of the page object, where do you put the business logic that determines the editable/visible status?
Okay, so sounds like a job for an event. BUT the OnOpenPage event passes only the "Rec" variable of the page not the page object or it's global variables. So now what? You have an event but nothing to relate back to the sender of the event.
So I can't do this simple customization as an Extension?
0
Answers
If I could set the editable/visible property to the return value of a function I could put the logic in the table but I have not been able to make that work. I am not even sure a field value will work.
Yes, there are some ugly workarounds that you could try but if you want my opinion you should not do that.
Extensions as today are only usable in the Dynamics 365 space and not really for NAV 2017.