Destinations
    • 07 Jan 2025
    • 9 Minutes to read
    • Contributors
    • PDF

    Destinations

    • PDF

    Article summary

    The distribution of each Lasernet report can be automated by using Destinations. Destinations allow you to configure multiple destinations (printer, email, screen, fax, custom ports, etc.) with different criteria for each report.

    Selecting Predefined Destinations when printing the report triggers the Lasernet Connector to identify the proper destination for the report based on the criteria and settings found in Destinations. This functionality is useful in cases where the report destination is not known, such as during batch jobs or when the end user does not need to manually select where the Lasernet report should be printed.

    Think of destinations as a funnel - the trajectory of the yellow circles starts from the top and goes towards the bottom.

    If the circles match the criteria for Destination1, they stay in Destination1.

    If the circles do not match the Destination1 criteria, they proceed to Destination2.

    If the circles do not match that criteria, they carry on to Destination3 and so on until they reach the Fallback destination.

    The Fallback destination is commonly an internal emailbox, which a department has to check once in a while to sort out why the emails never reached their destination.

    Recommendation for Funnel Fallback

    To make sure that people actually check this mailbox, sometimes it is better to set the Fallback destination to a printer. This is because printed-out emails make the visual impact more noticeable than a number of emails in an email box.

    Where Do I See or Set Up Destinations?

    In Dynamics 365 Finance and Operations, navigate to Lasernet > Common > Reports, select the wanted report, and click Setup > Destinations:

    Destinations

    General

    • Active

      • Yes: the destination is active and ready to ship the document.

      • No: the destination is deactivated and will not ship the document.

    When working with Destinations, start out with building the destination funnel in No status. Then test in the evening and validate the destinations with the customer. When they are approved, set them to No status in the test environments to prevent sending documents to real customer email addresses.

    • Description

      • Freetext field where you can write about the destination: an easy overview.

    • Destination type

      • Default: uses the report destination defaults if you have created them.

      • Printer: uses the Cloud print to print the document.

      • Email: uses the Email module in Lasernet to send the report.

      • Fax: uses the specified fax number to send the report.

      • Custom: uses the custom ports you have configured in Custom Ports and Lasernet developer to ship the document.

      • Screen: prints the report to screen. This option cannot be used with batch.

    • Suppress warnings: hides all warnings that may appear at run time while validating or skipping this destination.

    An example of a warning is the following:

    Warning

    Destination could not be reach - no email in "to email"

    This means that the customer has not set an email address in the to email field. Therefore, the PDF is traveling down the funnel to the Fallback destination.

    If your business has a Fallback destination and a clear process for handling and regularly checking it, the warnings can be suppressed by setting this field to Yes.

    • Priority: each Destination must have a Priority. The priorities start from 0 and determine the order in which the Destinations will be validated.

    • Find next

      • Yes: if the current destination is a match, the Lasernet report will be sent to the current destination and the next destination will also be validated. Use this option to send a Lasernet report to multiple destinations.

      • No: if the current destination is a match, the Lasernet report will be sent to the current destination and no other destinations will be validated after.

    References

    • Reference type: the type of FO account for this report. This setting corresponds with the values set in the Mapping FastTab of the report.

      • Accounts receivable (Customer)

      • Accounts payable (Vendors)

      • Global address book (Party)

    • Account code: define to which accounts this destination applies.

      • Table: a single account. Specify the account in Account selection.

      • Group: an account group. Specify the group in Account selection.

      • All: all accounts. Leave Account selection blank.

    • Account selection

    Condition

    A condition can be used to control when a destination is a match or not.

    • None - No condition.

    • Query - Can use query filters and ranges. Will match this destination if the query filters or ranges are met and will skip this destination if the query filters or ranges are not met.

    • Code - Can use an expression. Will match this destination if the code condition expression is True or 1 and skip this destination if the code condition expression is False or 0.

    Query example – The following images show a query condition that checks the customer group field. CustGroup must be 10 for this Destination.

    Code example - The following images show a code condition that uses an expression to check the customer group field. CustGroup must be 10 for this Destination.

    Custom Properties

    Custom properties can be used to pass additional job information for a report if defined in Lasernet > Setup > Defaults > Custom properties.

    File Format

    File format can be defined at the destination level for destination types, email, and custom port.

    How D Io Set Up an Email Destination?

    When configuring a Lasernet email destination, it is important to know the business process and the configuration of the emails in the ERP system. A business can:

    • Use a single email address to correspond with all its customers (for Quotations, Invoices, Collection letters, Account statements, etc.).

    • Use several email addresses for different purposes when corresponding with its customers and branches (Invoice to the Finance approve workflow, Quotation to the purchase approve workflow, Collection letters to the finance department email).

    • Send e-invoices to customers who do not wish to receive a PDF of the document.

    • Use a Fallback destination if the customer provides no email address.

    Ensure you are aware of this before setting up the funnel: the business must have a transparent overview about the processes and about what they need to provide. When they create an account for a new customer, they must be aware of the process and the configuration of the emails in the ERP system so that the new account will fit the configuration of the Lasernet email setup.

    The following describes the process of setting up an Email destination using standard Dynamics 365 FO Contact Information Purposes.

    Set Up Contact Information Purpose

    Standard Dynamics 365 Finance and Operations provides the option to add a purpose for each record in an account’s Contact Information section. For example, a customer account may have an email address with purpose Invoice to receive only invoices and a separate email address with purpose Business for all other communications.

    The contact information purpose setting can be leveraged to configure Lasernet emailing and ensure the Lasernet email setup fulfills the business needs.

    1. Ensure the Contact information option is enabled for the purpose options you wish to use. To this end, navigate to Organization administration > Global address book > Address and contact information purpose.

    Many options will be checkmarked as Contact information by default.

    1. Once you have ensured your purpose is enabled for Contact information, set up your accounts’ contact records to use the purpose. To this end, navigate to an account (Organization administration > Global address book > Global address book), expand the Contact information FastTab, Add a new record of type Email address, and provide the Contact number/address.

    1. Select Advanced.

    2. On the dialog that appears, click the drop-down menu and checkmark the purposes this email address should have.

    Create the Email Destination

    1. Navigate to Lasernet > Common > Reports, select your report, and select Destinations from the Action pane Distribution group.

    1. Create a new destination, provide the description, mark it Active, and set the destination type to Email. This will show an Email Parameters FastTab.

    Note

    The From e-mail value comes from Lasernet > Setup > Parameters > General > Email Defaults.

    1. Populate the Reference type, Account code, and Account Selection if applicable.

    Note

    For email type destinations, the reference details will determine where the contact information for the To Email address is coming from. It is important that the Reference details and the Mapping details are populated for email destinations to work.

    Select a Dropdown Option for the To Email Address Field

    The dropdown menu of the To email address field presents several options. Each option will return all the email addresses recognized for the customer or vendor accounts.

    • From Contact information: returns the email addresses from the account’s contact information.

    • From contact and contact information: returns the email addresses from the account's contact's contact information.

    • From contact: returns the email addresses from all the contacts' contact information. For this option, you will need to add a Query to select the emails from contacts.

    • From report: provides an overview of all fields in the report. A field can be activated as the value to use as the email address.

    • From code: provides the option to use a value expression that will be used as an email address.

    Filter on Purpose

    You can further specify which email addresses should be used by using filters. Filters are available for multiple dropdown options for the To email address field. For this example, select From Contact Information.

    1. The recognized email addresses are shown. Contact information is pulled from Customer accounts. This is because the Reference type was set to Customer for this report.

    As shown in the following image, all Roles are recognized:

    1. Select the Use query to get recipients checkbox.

    1. Click Filter.

    1. If not already present, add a line for the Table Roles and Field Role.

    1. Specify the Roles in the Criteria column and select OK.

    The recognized email addresses are now filtered by the specified Role. In this example, only email addresses with the Business Role will be used as destinations to send this report.

    1. Run the report.

    1. Review the email addresses used in the Journal. In this example, only the email addresses of the type Business on the customer account Contact information were picked up.

    Email Body

    Placeholders

    Placeholders can be used in the Email body to customize messages based on information in the record.

    1. Select the Setup email bodies button to open the E-mail body setup form.

    1. Expand the Values used in e-mail FastTab and select Add.

    1. A dialog opens with an Expression field. For this example, we will pull in fields from the report for our placeholder values. Select a table and then select a field.

    1. Add all the desired values for the placeholders.

    1. Use the placeholder values to write your subject and email body. This email subject and body will be used whenever this report is emailed in the specified language en-us.

    • Languages

    Every E-mail body record has a linked language. When the report runs in a specific language, the corresponding E-mail body record is used. If no translation exists for that language, the default translation is utilized.

    To ensure the current E-mail body is used when the report runs in a different language without translations, enable the Default for this record.

    1. If your emails may need to be in different languages, multiple E-mail body records can be created. Select Duplicate to create a new E-mail body record.

    1. Select the Language.

    1. Modify the subject and body as needed. This email body translation will be used if the report is run in the specified language, da.

    The results of running the report in en-us are:

    • Email address is of type Business for customer account US-001.

    • Email subject and body are in en-us, and placeholders are replaced with record-specific data.

    • HTML

    Lasernet FO Connector includes the option for preparing an HTML (XHTML) email body instead of plain text.

    To enable HTML, navigate to Lasernet > Setup > Parameters > Email, and set Email body editor type to HTML editor.

    The following image illustrates how to add an image to the E-mail body:


    What's Next
    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.