Skip to Content

How to show a modal dialog box to attach a file in SAP B1 9.2 PL04 Web Browser Access?

Dear Experts,

I am using SAP B1 version 9.2 PL04, I have a requirement to attach a file to UDO form, I am trying to open windows dialog to select a file using the following code segment; it is working fine in debugging and tracing mode and when creating an add-on for this; it is working fine on SAP B1 client, but when try to use SAP B1 9.2 PL04 web browser access; it is not working, the dialog is not open and I got the following message in the status bar:

Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.


Code Segment

OpenFileDialog openFileDialog1 = new System.Windows.Forms.OpenFileDialog();

NativeWindow nw = new NativeWindow();

string ProcessServiceName = "SAP Business One";


Global.StatusBar("wrn", "If 'Open File Dialog' is not shown, press Alt + Tab");

DialogResult result = openFileDialog1.ShowDialog(nw);


Your quick answer is highly appreciated.

Thanks & Regards

Samer Shuqair

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Dec 06, 2016 at 01:13 PM


    The normal dialog doesn't work in browser access. You can use SBO_Application.GetFileFromBrowser() to send a file to the server.

    Note that GetFileFromBrowser should be used only when in Browser mode. You can use the ClientType property to check.

    Pedro Magueija

    LinkedIn | Twitter | Blog

    Add comment
    10|10000 characters needed characters exceeded