Sales Order Confirmation - Print to PDF filename in NAV 2015

rosonroson Member Posts: 5
edited 2015-06-30 in NAV Three Tier
Hello,

I want to alter the filename given to a document when you use the Print -> PDF function. For example on a Sales Order, if I print the confirmation and select PDF it auto names it Report10075.pdf, I'd like to change it to [order number].pdf.
I've had a dig in the code but cannot find where - is it built in - I have found the code for emails (though that does what I would like).

Any ideas?

Thanks

Comments

  • MarijnMarijn Member Posts: 69
    I think you need to use the SAVEASPDF function if you want to set the filename yourself. Remember that primary keys are only unique for each company, so you might want to include the companyname in the filename if you want to avoid creating folders for each company.
  • sumitnandhasumitnandha Member Posts: 3
    [Ok :=] Report.SAVEASPDF(Number, FileName[, Record])

    Number ::::Type: Integer ::::The ID of the report that you want to run. On the View menu, click C/AL Symbol Menu to select the report from a list.
    FileName ::::Type: Text :::: The path and name of the file that you want to save the report as. Here, FileName:='C:\Sumit'+Rec.No+'.PDF';
    Record :::: Type: Record ::::Specifies which record to use in the report. Any filters that have been applied to the record that you specify will be used.

    Hope this Function work for you, :D
  • tinoruijstinoruijs Member Posts: 1,226
    It would be nice if this can be setup in future versions.
    Maybe you could add this request on Microsoft Connect?

    Tino Ruijs
    Microsoft Dynamics NAV specialist
Sign In or Register to comment.