Creating sales order through XMLPORT

I want to create a sales order through xml port. i want that xml port fetch data from one file and create a sales order

Parents
  • Sorry that I, again, has to ask you which version this is about and how did you imagine doing it? What have you tried your self, before asking this question? 

    You have to give a bit more details if you like us to be able to guide/help you.

    But I can say so much that using and XMLPort to import a sales order is absolutely not a development task for a beginner. Personally, even with my experience, then I would never be using an XMLport for something like this. XMLports are great for exports and simple XML file imports.

    Unless the XML file you are importing is very simple, and all your data is pre-validated, then it's much easier to program it directly in a codeunit, while using the build-in/dotnet XML functionality (depending on version of NAV/BC). But even here, then I normally would not dream about importing it directly into the sales header and line tables. I would create a buffer table(s), where I would store the data from the XML file, while validating it and creating the sales header and sales line records.

    If you were using a newer version (NAV 2016+) then you could also use the Data Exchange Framework, where you basically can use a number of predefined functions to import your file. The advantage of DEF is that the XML file is described in data, so a different format is just a different data definition. It takes some time to study how these design patterns work, but once you understand it, then its very powerful.

    But again, without more details about your requirements etc., then its very hard to suggest exactly what you should do......

Reply Children
Related
Recommended