Building the Browse for Folder lookup

Folder browsing lookups can be used when the user is required to specify a local or network folder, for storing or retrieving external files. Such lookups are generated outside of Dynamics AX, by using Windows API.

In this recipe, we will learn how to create a lookup for folder browsing. As an example, we will create a new field and control named Documents in the General ledger parameters form, which will allow us to store a folder path.

How to do it...

  1. In the AOT, open the LedgerParameters table, and create a new field with the following properties:

    Property

    Value

    Type

    String

    Name

    DocumentPath

    Label

    Documents

    ExtendedDataType

    FilePath

  2. Add the newly created field to the bottom of the table's General ...

Get Microsoft Dynamics AX 2012 Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.