Building a lookup for selecting a file

In Dynamics AX, file reading or saving is a very common operation. Most of the non-automated file reading or writing operations prompts the user to specify the file name.

This recipe will demonstrate how the user could be presented with the file browse dialog, in order to choose a file in a convenient way. As an example, we will create a new control called Terms & conditions in the Form setup form in the Procurement and sourcing module, which allows storing of a path to the text document.

How to do it...

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

    Property

    Value

    Type

    String

    Name

    TermsAndConditions

    Label

    Terms & conditions

    ExtendedDataType ...

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.