Share via


Drag and Drop files to Dynamics AX

A colleague asked me about what the method dropFile on a Window form control does. So now that I have written an e-mail with the answer I might as well post it here too.

If you place a Window control on the form, you can do some drag and drop work with files from outside AX. You drag the file from, for example, the desktop and drop it on your Window control. When you drop the file, the dropFile method of the Window control is called, with the filename and path as parameter. From here you can write X++ code to deal with the file.

I have attached a small sample form.

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at https://www.microsoft.com/info/cpyright.htm

Form_aaaDropFile.xpo