Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

Sales Order Dataport

Posted on by 165
Hi Team
I'm new to Dynamics NAV. We are trying to create a Dataport to Import Sales Orders to NAV 5.1 through csv files. I have couple questions regarding this.
1. Is there any standard template (dataport object) available for sales orders?
2. Is it possible to import using one dataport if sales lines are more then one for an order?
3. I understand that we need to create a dataport updating sales header and sales line tables. Do I need to write any code in the dataport to link the tables?

Thanks in advance

Hari

*This post is locked for comments

  • bigboi Profile Picture
    bigboi 125 on at
    Re: Re: Re: Re: Re: Re: Sales Order Dataport
    I have read documents but since I am a beginner at NAV its not such clear for me like it is for those who are working with NAV. I am student and got a task, its something like project to school..I have learn so many new things about NAV at all in last days but still cant understand how to import data from xml file into NAV I can offer any reward if needed. I am in a hurry, therefor i would be really thankful for any respond. Thanks in advance, Dalibor
  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Re: Re: Re: Re: Sales Order Dataport

    I would start here....

    Application Designers Guide
    PART 8 XMLPorts

    Chapter 21 XMLPorts
    XMLport Fundamentals
    Designing XMLports
    XMLport Examples
    Validating Data
    XMLports and Business Notification


    Also, available in the Mibuso.com download section
    Xml Export 1.3i
    viewtopic.php?f=7&t=1775

    XML Import Sample v1.0i
    viewtopic.php?f=7&t=2266

  • bigboi Profile Picture
    bigboi 125 on at
    Re: Re: Re: Re: Sales Order Dataport
    what about some xml exmaples? :)
  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Re: Re: Sales Order Dataport

    FYI - here are some dataport examples

    http://www.mibuso.com/forum/viewtopic.php?t=16024

  • bigboi Profile Picture
    bigboi 125 on at
    Re: Re: Sales Order Dataport
    Hi Dave, can you give us some more details about XMLports ?
  • Daniel Rimmelzwaan Profile Picture
    Daniel Rimmelzwaan 3,485 on at
    Re: Re: Re: Re: Re: Sales Order Dataport

    In a roundabout way you can use NAS, but I don't know if it's possible with PHP.

    First of all, NAV 2009 can expose codeunits as web services, so in that version you don't need NAS even. For earlier versions you'd have to create logic in NAV that monitors a message queue, or a TCP/IP socket, and this logic runs inside an instance of NAS. Then in your PHP you send XML messages into the message queue or the socket. The MSMQ adapter is very limited though (it must have a hard coded message label, no transactional queue, things like that) but it works very well.

  • Hari Profile Picture
    Hari 165 on at
    Re: Re: Re: Re: Sales Order Dataport

    Thanks Daniel!

    We are also looking at integrating through xml ports. Can you please let me know if it is possible to perform real-time update between NAV and PHP using NAS? Can we call codeunits and execute xml ports directly from php?

    Hari

  • Daniel Rimmelzwaan Profile Picture
    Daniel Rimmelzwaan 3,485 on at
    Re: Re: Re: Sales Order Dataport

    [quote user="Hari"]sales orders in csv format from webshop [/quote]

    Have you considered using XML format? Coming from a webshot I'd think that would not be too difficult to implement, and that will give you much more flexibility.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Re: Re: Sales Order Dataport

    Hi Hari,

    You can write the dataport directly into the sale order tables but the way I normally do this is to base the dataport on the Virtual table "Integer". This allows me to test the imported value are valid and log issues.  If using this way then you need to code the insertion into the sales order tables.

    Hope this helps

  • Hari Profile Picture
    Hari 165 on at
    Re: Re: Sales Order Dataport

    Thanks Dave for your reply!

    I am importing sales orders in csv format from webshop developed using php and MySQL and have all the details that are required for an order.

    Thanks

    Hari

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans