How Do I Set Up and Use OutFile in the Default Configuration?
    • 11 Nov 2024
    • 2 Minutes to read
    • Contributors
    • PDF

    How Do I Set Up and Use OutFile in the Default Configuration?

    • PDF

    Article summary

    This article describes how the OutFile module is used within the Lasernet 9 Default Configuration for Lasernet FO Connector.

    The OutFile output module in the default configuration is used as a type of storage for FO. This type of storage may be used for OnPrem solutions that do not use Azure Storage and, instead, use a file system to print reports.

    Setup in Lasernet Connector

    Follow these steps within the FO to set up the module:

    1. Navigate to Lasernet > Setup > Administration > Connections.

    2. Create a new connection with Connection Type: Storage, Type: File System, and specify a Directory path.

    This connection will be Lasernet Connector’s output location and Lasernet input location.

    1. Create another new connection with Connection Type: Storage, Type: File System, and specify a Directory path.

    This connection will be Lasernet’s output location and Lasernet Connector’s archive location.

    1. Navigate to Lasernet > Setup > Administration > Lasernet servers.

    2. Create a new Lasernet server. Give it a Server name, Description, Default for, and make it Active.

    3. Set your Outgoing connection to the file input created in step 2.

    4. Set your D365FO connection to reports storage to the file output created in step 3.

    The D365FO connection to reports storage’s connection type determines the OutStorageType jobInfo in the XML. In this case, the OutStorageType will be FileSystem.

    1. On Lasernet Server > Lasernet Developer > Modules, ensure ListeningOnFiles is Active, and the Directory path matches the Outgoing connection on your Lasernet server in step 3. If this is completed and deployed, the Lasernet Server in Lasernet Connecto will validate successfully.

    1. Try printing a report to this server from Dynamics 365 FO. As a test, print to Lasernet Screen.

    1. Review the XML file generated by Lasernet Connector. OutputFilePath is populated with the path you determined in the Connection. OutFileStorage is populated, and OutputStorageType is FileSystem.

    Process in the Lasernet Server

    Follow these steps:

    1. Navigate to the Lasernet Server > Lasernet Developer > Modules.

    2. Select the Destination selection Pass-Through and select the Destinations tab.

    The OutFile output module in the Default configuration depends on the JobInfo runOutFile = true.

    This JobInfo is set in script setCriteriaVariables().

    1. Close the Destination selection Pass-through, and select Scripts.

    2. Scroll down to LAC Functions and double-click setCriteriaVariables().

    1. Scroll to the line where var runOutFile is set. Variable runOutFile will only be true if the JobInfo OutStorageType is FileSystem, the job is not a printOut, the file is a PDF, and both OutFileStorage and OutFilePath are not empty. All these conditions are met with the setups carried out in Lasernet Connector.

    1. You can verify the value for runOutFile in the Lasernet Monitor.

    If runOutFile is true, the job is sent to the OutFile module, and jobInfo OutFilePath is used as the Directory path.

    1. To verify files are being sent to the proper Directory path, navigate to the directory path. The file is saved.

    How to Stop XML from Being Saved in the File Output Folder with a PDF

    There are two ways to avoid having an XML file saved in the File Output Folder with a PDF.

    The first way is to disable Archiving. Follow these steps:

    1. Open FO and navigate to Lasernet > Reports > Archive.

    2. In the Archive field, select No.

    The second way is to enable Archiving with Save XML disabled. Follow these steps to do so:

    1. Select Default under the Archive field.

    2. Toggle the Save XML button to No.


    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.