Printer Selection by Location Code

I recently was asked to redirect a invoice printout to different printers depending on a code variable on the sales invoice header.  The solution was created and I would like to share it with the example of using printers by location.

After installing this solution you will be able to select a invoice printer for each location.  If non is selected then the default printer from Printer Selection table will be used according to standard Dynamics NAV functionality.


4 Replies to “Printer Selection by Location Code”

  1. Hi Gunnar,

    I have tested your code on Demo Database which provided in the Installation Package of Dynamics NAV 2009 R2. However, it does not work. The report in Posted Sales Invoice just use the default printer.

    Then, I tried some modification such as changing the Temporary property of PrinterSelectionBuf to No. I found that No Record was created in Printer Selection table. Do you have any idea why your code does not work?

    Hieu Vu

  2. The code includes changes in Codeunit 1. Did you remember to close the company and reopen after importing the code ?

    I tested this on a CRONUS database and it works for me.

  3. Hi Gunnar,

    I would like to see the solution, but I can’t find a download link to objects – nor a link to see the code bits.
    Am I missing something here, or could you make sure a link is visible for download?

    Kind regards

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.