"Link address is not valid" during Post and Print + PDF

VotucVotuc Member Posts: 206
edited 2010-10-15 in NAV Three Tier
Hi, have another question:

I have code based on this that allows a Sales Invoice to be converted to PDF then attached to email when clicking the Post + Print" button.

When I run the code it Posts the order and brings up the email but also says: "Link address is not valid" and the "Edit sales order" window stays open.

Any idea what "Link address is not valid" means in my code?
                  REPORT.SAVEASPDF(206, 'C:\temp\'+STRSUBSTNO('Invoice No. %1.pdf',SalesInvHeader."No.")+'.pdf', SalesInvHeader);
                   
                  HYPERLINK('C:\temp\'+STRSUBSTNO('Invoice No. %1.pdf',SalesInvHeader."No.")+'.pdf'); //opens PDF on screen
                   
                  SalesInvHeader.SETRANGE("Posting Description",'Order ' + "No.");
                  SalesInvHeader.FIND('-');
                  invno := SalesInvHeader."No.";
                  Cust.SETRANGE("No.",SalesInvHeader."Sell-to Customer No.");
                  Cust.FIND('-');
                  emailtoaddr := Cust."E-Mail";

                  Mail.NewMessage(emailtoaddr,emailccaddr,STRSUBSTNO('Invoice No. %1',SalesInvHeader."No."),
      'Attached please find invoice ' + SalesInvHeader."No." +'.','\\'+Hostname+'\C$\temp\'+STRSUBSTNO
      ('Invoice No. %1.pdf',SalesInvHeader."No.")+'.pdf',true)

Comments

  • SavatageSavatage Member Posts: 7,142
    Turn on the debugger and see which line it stops on.
  • SNielsenSNielsen Member Posts: 37
    SAVEASPDF is run on the service tier. And your hyperlink is run locally, that is why it says "Link address not valid". You need to transfer the PDF file to the RTC before you can hyperlink to it.
  • krikikriki Member, Moderator Posts: 9,115
    [Topic moved from 'NAV Three Tier' forum to 'NAV/Navision Classic Client' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • VotucVotuc Member Posts: 206
    SNielsen wrote:
    SAVEASPDF is run on the service tier. And your hyperlink is run locally, that is why it says "Link address not valid". You need to transfer the PDF file to the RTC before you can hyperlink to it.


    Thank you SNielsen - that explains why it works on the server PC but not from the RTC on the client's PC. Do you know what else I can use??

    This is a 3-tier thread - not classic. I'm sorry I failed to mention that I am working with 3-tier but that is why I posted it under 3-tier.
  • SNielsenSNielsen Member Posts: 37
    This blog post should be what you need: http://blogs.msdn.com/b/nav/archive/201 ... g-box.aspx
  • krikikriki Member, Moderator Posts: 9,115
    A Three Tier problem after all so:
    [Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Three Tier' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.