Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

Print orders From .NET

Posted on by 175

Hi, I am using web services to create sales orders in NAV from .NET

After create the order in .NET I would like open the NAV document and print it automatically.

Now I am using this, and I receive correctly the URL, but to invoke NAV I must Copy the url and paste it in explorer, so I can view it and print it.

URL:=GETURL(CLIENTTYPE::Windows,'SINASE ALFONSO, S.A.',OBJECTTYPE::Page,130,Rec);

Do you know any way to open directly the Nav Order, and print it automatically? Thanks!

*This post is locked for comments

  • Verified answer
    Jaime Figueras Profile Picture
    Jaime Figueras 175 on at
    RE: Print orders From .NET

    Using default Shell of VB doesnt works, but using this:

    Public Declare Function ShellExecute Lib "shell32.dll" Alias _

       "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _

       ByVal lpFile As String, ByVal lpParameters As String, _

       ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

     

    ShellExecute 0, "open", URL, vbNullString, vbNullString, vbNormalFocus

     

    (Where URL is DynamicsNav://.........)

    Works perfectly

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