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)

External Web Service Nav 2017

(0) ShareShare
ReportReport
Posted on by 782

Respected Members i have one issue hope you will help me.

i have nav 2017 and i integrated with NopCommerce through web service every thing is perfect Now my Point is that i want when i enter a new order or item that item or order will save in nav DB and also store in a NopCommerce Data Base how to do this need urgent help.

Thanks in advance. 

*This post is locked for comments

I have the same question (0)
  • keoma Profile Picture
    32,729 on at

    You''ll find according Postings on mox4nav.WordPress.com.

  • Muhammad Arif Maseed Profile Picture
    782 on at

    not found on mox4nav.WordPress.com.

    can you please add proper links ?

  • Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    It's not clear what's your architecture here.

    1) Do you have NAV objects exposed as web services to NopCommerce or do you have NopCommerce that exposes WS to NAV?

    2) Do you enter the order inNAV and you want to pass it to NopCommerce? If so, after inserting the order in NAV you have to call a WS from NopCommerce (if it has it) or from NopCommerce you have to call the Sales Order Page object from NAV that you need to publish as web service.

  • Muhammad Arif Maseed Profile Picture
    782 on at

    i have NAV object exposed as a web service to NopCommerce.

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    If this is the scenario, from NopCommerce you need to call the NAV SalesOrder page that you've exposed as web service.

    As an example, I report here a piece of code that comes from my book "Building ERP solutions with Microsoft Dynamics NAV". You retrieve all the orders based on the filters you want and save them on NopCommerce:

    private static void ReadNAVSalesOrders()

    {

    //Here we have to call our NAV web service for reading Sales Orders

    //Web Service instantiation

    SalesOrder_Service ws = new SalesOrder_Service();          

    ws.Url = Properties.Settings.Default.NAVWSURL;

    ws.UseDefaultCredentials = true;

    //Setting filters on the table

    List<SalesOrder_Filter> filterArray = new List<SalesOrder_Filter>();

    SalesOrder_Filter filter = new SalesOrder_Filter();

    filter.Field = SalesOrder_Fields.Sell_to_Customer_No;

    filter.Criteria = "10000";

    filterArray.Add(filter);

    //Reading sales orders

    List<SalesOrder> orderList = ws.ReadMultiple(filterArray.ToArray(), null, 0).ToList();

    //Printing the results

    if (orderList!=null)

    {

        foreach(SalesOrder order in orderList)

        {

           Console.WriteLine("Order No.: " + order.No);

           Console.WriteLine("Order Date: " + order.Order_Date);

           Console.WriteLine("----------------");

        }

        //Waiting user input to terminate

        Console.ReadKey();

    }

    }

  • Muhammad Arif Maseed Profile Picture
    782 on at

    still stuck not solved 

  • Verified answer
    keoma Profile Picture
    32,729 on at

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