WinAPI::browseForFolderDialog Method [AX 2012]

Opens a browser for the folder dialog box. The user can select a single folder.

Syntax

client public static str browseForFolderDialog(
   [str _description, 
    str _selectedPath, 
    boolean _showNewFolderButton])

Run On

Client

Parameters

  • _description
    Type: str
    The descriptive text that is displayed above the tree view control in the dialog box. The default is empty; optional.
  • _selectedPath
    Type: str
    The folder from where the browsing starts. The default is empty, starting from Desktop; optional.
  • _showNewFolderButton
    Type: boolean
    A Boolean value that determines whether the New Folder button appears in the folder browser dialog box. The default is true; optional.

Return Value

Type: str
The path selected by the user. Returns blank if the user cancels the dialog box.

Remarks

This method lets you prompt the user to browse, create, and eventually select a folder. Use this method when you only want to let the user select folders, not files. Browsing of the folders is performed through a tree control. Only folders from the file system can be selected; virtual folders cannot. Optionally, you can set the _selectedPath to an absolute path that will initially be selected. You can also optionally set the _description property to provide additional instructions to the user.

You can use the _showNewFolderButton property to control if the user is able to create new folders with the New Folder button.

See Also

Reference

WinAPI Class