XMLPort 2009 - how to insert Sales Line Description lines from xml file lines

How do I import each of these fields as individual Sales Lines for Description only?

The Sales Invoice import file has a few lines at the bottom for messages, text etc attached to the Sales Invoice. These do not have the normal nested layout for multiple fields, but have the Description content in the node.

The file is being imported with all fields as text, then code behind the sections to import the data into the relevant fields in the tables, so the normal layout to connect the table isn't there.

I've put code behind the Import::OnAfterAssignVariable section, but the import doesn't seem to be recognizing it. The message included in the section doesn't display.

Example section from the import file is below. Each of these lines are to be imported as separate Description lines to the Sales Line table at the bottom of the document.

<RentalMessage />
<TotalValue1>You currently have $1,800.00 in total assets in your possession.</TotalValue1>
<MarketingMessageLine1>Thank you for choosing Demo Supply</MarketingMessageLine1>
<MarketingMessageLine2>Your one stop shop for all your</MarketingMessageLine2>
<MarketingMessageLine3>gas, welding and equipment needs!</MarketingMessageLine3>
Thanks

Debbie

Answers

  • Percussive_ResetPercussive_Reset Member Posts: 1
    Hi,

    first of all: The Import:OnAfterAssignVariable Trigger is the right place to go, so that's not the problem here.

    But I assume you start the XMLPort with the Classic-Client?
    This could be problematic because the XMLPorts are not functionally equal implemented in the Classic Client of NAV 2009 (and NAV 2009R2)

    Commands like:
    • MESSAGE
    • CONFIRM
    • ERROR

    can be problematic because the message boxes may not show up in Classic Client at all.

    Everything else should work fine though.*

    *: with some exceptions

    So try to retrieve your Messages as global variables and show them in a codeunit and it should work fine!

    I hope this helps!
Sign In or Register to comment.