MLport Request Page in Nav 2013

ahmednav273ahmednav273 Member Posts: 3
edited 2014-01-21 in NAV Three Tier
I am converting Dataport to XMLPort and add some customization on its request Page. But doing that XMLPort's default import and export window disappears, thus i lost the XMLPort's file selection and import/export options, my question is how can i retain these options and add some control on my own too.

For this question I did this

(

I write the code using File Management Code Unit then i am able to select file

but after selecting file when i click Ok on Request Page Its again open window Dialog File

for selecting file this cuse problem for me,any solution :?
here is code which i write



ManualFileName := FileManagement.OpenFileDialog('Import File','xxx.txt','Text Files (*.txt)|*.txt');

)

If this is not possible then, what is simple way to add the file selection and import/export option on my own on the request page of the XMLPort. :-k

Please help

Thanks in Advance

Comments

  • geordiegeordie Member Posts: 655
    Request page disappears changing XMLport property "Direction" value (from default, "Both"): you can restore it combining with request page SaveValues property.
    Otherwise how about using currXMLport.FILENAME command?
  • ahmednav273ahmednav273 Member Posts: 3
    Thanks for reply geordie,

    My senario have both things either user select the default path by selecting check box on request page
    or by assist button, but when user select checkbox then no need of file dialog box, and problem is that file dialog box
    open in both condition :-k

    i try both ur suggestions already but same problem....! :?
  • geordiegeordie Member Posts: 655
    What about using streams when users don't need of dialog, with code like this?
    ImportFile.OPEN(FileName);
    ImportFile.CREATEINSTREAM(InStr);
    YourXMLport.SETSOURCE(InStr);
    YourXMLport.IMPORT;
    
Sign In or Register to comment.