Try Microsoft Edge
A fast and secure browser that's designed for Windows 10
I have an extension that's posting sales documents through a scheduled task and I am running into a problem with the Sales-Post codeunit with regards to the Window/Dialog.
The InitProgressWindow contains the code shown below - how do I avoid the code in red raising an error when the Client Type = SOAP, API or NAS, i.e. in instances when the code is executed from a client where the Dialog is not supported without changing this code?
I've not an environment here to check at the moment but you cannot avoid the dialog if this is the Microsoft's code. Normally you should place IF GUIALLOWED THEN before the OPEN dialog method if you want to use this function in WS or job queue.
Have you checked if Microsoft do that before calling InitProgressWindow? Something like:
IF GUIALLOWED THEN
Thanks for your response.
The method/code calling the InitProgressWindow does not have a IF GUIALLOWED check but the good news is, for some reason, the document does indeed get posted even with this code in place. I guess Microsoft built in some underlying logic to suppress dialogs when the code is executed in the context of NAS/SOAP/API.
Business Applications communities