Thursday, November 21, 2013

File open dialog on AX 2012 form

Problem:
I want to show a file open dialog on AX 2012 form but when I click the open dialog button it doesn't respond.

Solution:
On Runbase OR Sys operations framework, all you have to do is set the EDT to FileNameOpen and dialog will appear, however, on AX form only setting the EDT will not do. You will need to add following methods to your form methods node.

str filenameLookupFileName()
{
    return "";
}

FilenameFilter filenameLookupFilter()
{
    return ["@SYS134052", #AllFilesName+#AllFilesExt];
}

str filenameLookupInitialPath()
{
    return "";
}

str filenameLookupTitle()
{
    return "Select a trade agreement to import";
}

4 comments: