This should be made conditionally here and on the subsequent updates and closing of the window.
This can be accomplished by adding an 'if not GuiAllowed' to open the window conditionally, or add a new parameter to the OnCodeOnBeforeWindowsOpen like SuppressWindowOpen.
Additional context
We want to create an automatic import of Sales Orders (which can be prepaid).
This needs to include the posting of the Prepayment Invoice either from the Job Queue of via an API-call.
We either want to be able to set a Boolean to prevent the opening/updating of the Window or an 'if GuiAllowed' test before the calls to the Dialog Window.
Describe the request
In de 'Code' procedure of SalesPostPrepayments a Windows.Open is performed unconditionally.
This should be made conditionally here and on the subsequent updates and closing of the window.
This can be accomplished by adding an 'if not GuiAllowed' to open the window conditionally, or add a new parameter to the OnCodeOnBeforeWindowsOpen like SuppressWindowOpen.
Additional context
We want to create an automatic import of Sales Orders (which can be prepaid). This needs to include the posting of the Prepayment Invoice either from the Job Queue of via an API-call.
We either want to be able to set a Boolean to prevent the opening/updating of the Window or an 'if GuiAllowed' test before the calls to the Dialog Window.