web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Sales Order Dataport

(0) ShareShare
ReportReport
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

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hi Hari,

    1. Not a standard dataport but there are XMLports examples. 

    2. Yes

    3. Depends on situation - see below.

    Dataports are a mechanism to get the data in/out of Nav and are very flexible.  The design and complexity of the coding will depend on the files available to import.  If you are flexible on this, then design a dataport and export an example file to give you a template. What is the source of the order files and how much detail is available?

  • Hari Profile Picture
    165 on at

    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

     

  • Community Member Profile Picture
    on at

    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

  • Daniel Rimmelzwaan Profile Picture
    3,485 on at

    [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.

  • Hari Profile Picture
    165 on at

    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
    3,485 on at

    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.

  • bigboi Profile Picture
    125 on at
    Hi Dave, can you give us some more details about XMLports ?
  • Community Member Profile Picture
    on at

    FYI - here are some dataport examples

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

  • bigboi Profile Picture
    125 on at
    what about some xml exmaples? :)
  • Community Member Profile Picture
    on at

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans