AX 2012: Open a Folder with X++

In this post I want to show you a quick and dirty way to open a folder via X++ in AX 2012.

Open a Folder in AX 2012

I added the following code at a Button in the clicked method like this.

void clicked()
DocumentManagementHelper::openFolder(ExcelExportLocation::Local, "YourPath");
view raw open_folder_xpp hosted with ❤ by GitHub

All it takes to open a folder via X++, is the DocumentManagementHelper class and its static method OpenFolder. Just pass the ExcelExportLocation Enum (0 – Local, 1 – Remote) and specifiy your path as string for the second parameter.

You may also like...