Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Question about pulling data in Windows

Posted on by Microsoft Employee

Hello all,


I am really overwhelmed on where to start my project. Basically (i hope it's basic), what I need to do is pull NAV information from a Windows system connected to the network where the NAV server is connected. The only information I need to retrieve is a couple line items from a customers work order in order to continue my script.

Do I really need an API to achieve this? Can I just use powershell to remotely connect to the NAV server, using just a read-only user account to just pull some non sensitive data in the form of an XML and/or text file? 

*This post is locked for comments

  • Suggested answer
    Alexander Ermakov Profile Picture
    Alexander Ermakov 28,094 on at
    RE: Question about pulling data in Windows

    You can publish a Page as web service in NAV (refer here: msdn.microsoft.com/.../dd355398(v=nav.90).aspx) and consume it further.

    You can operate as well on the SQL level directly with the SQL data to achieve your needs. You can use PowerShell for that purpose as well (e.g., stackoverflow.com/.../using-powershell-to-send-data-from-sql-server-to-service-via-soap or similar).

    If you prefer 2nd option, you can search more info in SQL forum threads.

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Question about pulling data in Windows

    There is no official documentation check the below links how to consume webserivce from powershell

    blog.robseder.com/.../calling-a-soap-web-service-from-powershell-3-0

    www.leeholmes.com/.../calling-a-webservice-from-powershell

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Question about pulling data in Windows

    Is there a tutorial on how to set this up on the client side, assuming the web service is already setup?

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Question about pulling data in Windows

    Yes as long as you have access to the web service and you publish the webservice to retrieve the data.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Question about pulling data in Windows

    Is it possible to use powershell to retrieve NAV data from a different PC on the network?

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Question about pulling data in Windows

    If you just want to read some data then publish the data using NAV webservices or by executing SQL and both of these can be executed using powershell.

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

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