Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

External Web Service Nav 2017

Posted on by 768

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

  • Verified answer
    keoma Profile Picture
    keoma 32,675 on at
  • RE: External Web Service Nav 2017

    still stuck not solved 

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: External Web Service Nav 2017

    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();

    }

    }

  • RE: External Web Service Nav 2017

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

  • Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: External Web Service Nav 2017

    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.

  • RE: External Web Service Nav 2017

    not found on mox4nav.WordPress.com.

    can you please add proper links ?

  • keoma Profile Picture
    keoma 32,675 on at
    RE: External Web Service Nav 2017

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

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,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans