Options

import from xml file dlg

dagodago Member Posts: 22
Hello there guys,

Doest anybody have an idea how to let choose the file on local disc by user instead of defining exact path?

Thanks,

dago

Comments

  • byllebylle Member Posts: 47
    Hi!

    Take a look on codeunit 412 "Common Dialog Management" - here you will find the function OpenFile.
    This function opens a windows, where you can select a file.

    Just use a code similar to this:
    DefaultFileName := Setup."Eksport path" + '\*.xml';
    FileName := CDM.OpenFile(WindowTitle,DefaultFileName,DefaultFileType::Custom,FilterString,Action::Open);
    

    For example, if you want to use the code on a Form, then simply add it to OnAssistEdit() for the field that should contain the XML filename.
Sign In or Register to comment.