Web client - select a folder

NAVupNorthNAVupNorth Member Posts: 14
We're upgrading a customer to Business Central using the web client / desktop app. They had functionality in the old version to select a network directory as part of an integration. I can't find a way to replicate this in the web client since dotnet isn't supported and it looks like they'll have to manually copy and paste the path into the field. Is there any way of achieving this? Thanks in advance for any help!

Answers

  • ftorneroftornero Member Posts: 522
    Hello @NAVupNorth ,

    If, like I gess, it is BC on-prem, you can use dotnet running on the server in the web client.

    Regards.
  • wolfskinwolfskin Member Posts: 84
    You can use UPLOADINTOSTREAM function to select a folder.

    https://docs.microsoft.com/en-us/dynamics-nav/uploadintostream-function--file-
  • aacnsilvaaacnsilva Member Posts: 23
    Try using function [External] SelectFolderDialog(WindowTitle : Text;VAR SelectedFolder : Text) : Boolean in Codeunit 419 File Management
  • NAVupNorthNAVupNorth Member Posts: 14
    Thanks all for the suggestions.

    @ftornero - using a copy of SelectFolderDialog from the File Management codeunit, with the dotnet variables changed so they run on the server, gives this 'A call to System.Windows.Forms.FolderBrowserDialog.ShowDialog failed with this message: 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'.

    @BlackTiger - this is probably going to be the route we have to go down for now, you're right it's not the biggest issue in the world

    @wolfskin - I can only get the file name, without the folder path that it was selected from.

    @aacnsilva - that gives 'The operation cannot complete because it uses a feature that is not supported (.NET Framework Interoperability.)' in the web client.
  • NAVupNorthNAVupNorth Member Posts: 14
    @aacnsilva that's perfect, works a treat. Thank you very much!
Sign In or Register to comment.