Getting filename parameter to XMLport

ccbryan63ccbryan63 Member Posts: 115
This seems like it should be simple... but I'm needing some help.

In 2009, I have an XMLport (import purchase invoices) that is to run from an RTC page. In test environment it runs properly: Page Action calls codeunit that runs XMLPort. For testing, the codeunit specifies the import file.

My question is: How do I allow the user to enter the name of the file to be imported? Presumably in the request page of the XMLPort, and if someone could give me an explanation of how I would be very appreciative.

I also have considered using a textbox on a form/Page, but I don't know how to pass a parameter to my codeunit...? Again, seems like a simple task but I don't spend enough time in NAV perhaps.

Thanks very much for any help...

Chandler

Answers

  • TonyHTonyH Member Posts: 223
    I personally like to call "Common Dialog Management" codeunit on the "OnPreXMLPort" trigger and set it there, unless there is a need to filter in which case I add a new text variable to the request form/page and attach Common Dialog Management to the assist edit of that field.

    Give it a try see if it works for you.
  • boevesboeves Member Posts: 6
    I just finished with a dataport to import a deposits file. In the Properties page of the XMLPort itself (not any of the specific Nodes), there is a property called: UseRequestForm. When set to true, you can prompt the user for specific parameters, or if not needed, before the file imports a directory dialog opens and allows them to choose the specific file they wish to import.

    I also have the fileName property set to <undefined>.

    Hope that helps!
  • ccbryan63ccbryan63 Member Posts: 115
    Thanks Tony, that was exactly what I needed.

    I had searched NAV help for "Dialog" but all I found was the beep function.

    Chandler
Sign In or Register to comment.