I'm trying to disable a Field of a Page for duration of another process. I've set the Enabled property to a global Boolean variable (which also has property IncludeInDataset = Yes). Now when I set this property to FALSE, the Field doesn't immediately get disabled. It seems like this property is only evaluated when Page is idle (after all of the functions exit). But I need to set it to FALSE, do some processing and set it back to TRUE again in the same function. I've tried CurrPage.UPDATE - no luck. ](*,)
0
Comments
If I understand it correctly, you run some process and you want to set the property during this process to false and back. Isn't it useless because user will not be able to do anything during the process is running even without this?
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I have a C/AL function, which uses a COM object to do some processing. That COM object pops up a dialog box, which I'd like to be modal, but couldn't find a way, as getting the handle of the active RTC window is not easy and/or reliable. So the dialog shows up and the user can do anything with the UI. That's why I chose to disable the page, so the user can't touch the UI and call more processes with dialogs. Any ideas? :roll:
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Edit:
Passing the window handle didn't work... The execution is completely detached from NAV. I can even close RTC and I still have the automation running, the process completes without RTC. I'll have to come up with some complex workaround in this case...
I'm calling ControlAddIn separately before the actual processing with an Index, indicating to disable the UI. Then the next call is the actual processing with enabling of UI at the end of the function. Pretty ugly from programmer's perspective (as many of NAV solutions ), but it works and is simple.
This definitely was a lesson for me. Thanks, kine, for the input.
Sometimes I get this error: "An internal error has occured. Multiple concurrent calls have been issued to the server from this client."
I think this is because of two subsequent ControlAddin calls. The behaviour is really strange, looks like there are lots of problems with the synchronization between the Add-in and NAV... :-k
I've also seen some other errors and odd behaviour in area that's supposed to be really simple, synchronous and shouldn't give results that I'm getting...
Any suggestions? Tips of add-in developing, practices? Information sources about add-in and NAV communication and internals? Any help appreciated.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.