Handle UI interaction when working with web services

Completed

When publishing a web service, make sure that the code that you are publishing does not assume the ability to interact with a user through the UI. You can use the GuiAllowed function to suppress the UI to ensure that errors are suppressed when code is called from a web service client. Only use the GuiAllowed function to encapsulate the code that could cause an error, not the whole business logic.

The web service client should also handle exceptions when it's calling a web service. Therefore, exceptions must be handled to prevent the system from ending the run process.

Check with the GuiAllowed function when you are using one of the following dialog functions:

  • Close

  • Confirm

  • Error

  • Open

  • StrMenu

  • Update

The Message function is the only dialog function that doesn't cause an exception.

Avoid using the following keywords:

  • Page.Run

  • Page.RunModal

  • Activate

  • Report.Run

  • Report.RunModal

  • Hyperlink

  • File.Upload

  • File.Download