Folder browsing lookups are used when the user is required to specify a local or network folder for storing or retrieving Dynamics AX data. In this recipe, we will see how such lookups could be built using various techniques.
As an example, we will create a new control called Documents in the Ledger parameters form, which will store a folder path.
Open the LedgerParameters table in AOT, and create a new field:
Property
Value
Type
String
Name
DocumentPath
ExtendedDataType
FilePath
Label
Documents
Add the newly created field to the bottom of the General field group.
Open LedgerParameters form in AOT, and create the following method:
str filePathLookupTitle() { return "Select document folder"; }
To check the results, open General ledger | Setup | Parameters, and notice that now it has a new control Documents, which allows you to select a folder: