- Print
- PDF
A Form link is a functionality in Lasernet FO Connector that enables you to add Lasernet buttons in the system, which will trigger a Lasernet print or reprint of a report.
It is possible to place a form link in any Dynamics 365 form.
The form links can be managed for each report. To do so, follow these steps:
Navigate to Lasernet > Common > Reports.
Select the report and click Setup in the Action pane. Select Form links from the Links group.
In the page that opens, you can specify where the Lasernet buttons are added:
Settings | Definition |
---|---|
Form name | Name of the form in AOT. This is the name of the form in Dynamics 365 FO where the Lasernet button should be added. |
Control name | Name of the Control in the form. The Lasernet button will be added before or after this control on the form. |
Position | Position of the Lasernet button in relation to the Control. |
Properties | Definition |
---|---|
Menu labels | Defines the label for Lasernet menu button on forms. |
Label | Defines the label for the Lasernet Print button. |
Name | Name of the image to add to the Lasernet button. |
Hide archive | Defines whether to hide or show the archive menu item on the selected form. |
Single button | Shows the Lasernet button as a single button. |
Multi-select | Setup report run scenario when multiple records are selected. |
Data source | Identifies the form data source that is used for multi-selection. |
Background print | Shows the option to process reports in the background (batch mode). |
Print controls | Definition |
---|---|
Copy preview | Defines standard buttons used when previewing and resending reports from Dynamics 365 Finance and Operations Journals. Required for replacement query reports. |
Original preview | Defines standard buttons used when previewing and resending reports from Dynamics 365 Finance and Operations Journals. Required for replacement query reports. |
Resend | Defines standard buttons used when previewing and resending reports from Dynamics 365 Finance and Operations Journals. Required for replacement query reports. |
Condition: A condition can be used to control when to show or hide the form link.
None: will always show this form link as active.
Code: can use an expression. Will show this form link as active if the code condition expression is True or 1 and will make this form link inactive if the code condition expression is False or 0.
Query: can use query filters and ranges. Will show this form link as active if the query filters or ranges are met and will make this form link inactive if the query filters or ranges are not met.
Clicking the Load default button can automatically identify the setup for the following reports:
SalesConfirm
SalesQuotation
SalesQuotationConfirmation
SalesPackingSlip
SalesInvoice
FreeTextInvoice
PurchPurchaseOrder
PSAPurchaseOrder
PurchPackingSlip
PurchReceiptsList
VendInvoiceDocument
CustCollectionJour
CustInterestNote
Values for such fields as Form name, Control name, and Position, as well as values for all the fields of the Print controls section, are automatically defined.
The Hide archive toggle button allows you to define whether to hide the archive on the selected form.
The Defaults button, available in the Print controls section, allows you to find the copy, original, or resend button for the selected form name.
How to Add a Form Link to a Form
A form link is a functionality in the Lasernet FO Connector that allows you to add Lasernet buttons in the system, which will trigger a Lasernet print or reprint of a report.
To do so, you will need to do the following:
Identify the report for which you will create a Lasernet button.
Identify the name of the form where the Lasernet button will be added.
Identify the position of the Lasernet button on the form.
Create and configure a Form Link for the report.
The following steps illustrate how to add a form link to a form.
Identify the name of the form where the Lasernet button will be added
Navigate to the form in Dynamics 365 Finance and Operations where the Lasernet button will be added. In this example, we will use Project management and accounting > Quotations > Project quotations.
Select the quotation, click Quote in the menu bar, and then Quotation confirmation journal.
Right-click on the form and select Form Information to find the Form name.
Identify the Position of the Lasernet Button on the form
Identify where you would like to add the Lasernet button. You can add the Lasernet button before or after an existing control.
Right-click an existing control and select Form Information to find the Control Name.
Create and Configure a Form Link for the Report
Navigate to Lasernet > Common > Reports and select the report. On the Action pane, select Form links.
Click New to create a new form link. Add the Form name into the Form name field. The Control name and Position allow you to determine where you would like to place the Lasernet buttons. Choose a control name from the dropdown and a position: your button will appear before or after the specified control.
If you are using a replacement query for an SSRS report or an SSRS report enabled for Lasernet, the form link setup will include a Print Controls section. Select the controls that perform the print functions for the standard report for the Copy preview, Original preview, and Resend fields, respectively.
The Defaults button will try to find the copy, original, or resend button from the selected form name for select SSRS reports.
Navigate back to the form and verify the Lasernet button is added.
Dialog Setup
Dialog setup is a Lasernet FO Connector function that allows you to customize the dialog that appears when you run a Lasernet report. If you have a custom query with a form link, you can use Dialog setup to customize the behavior and options of the Lasernet button when it is clicked.
Examples of behaviors you can customize with Dialog setup include adding parameters to the dialog that enable the user to make selections or adding notes when printing the report, and adding default ranges so the report recognizes the currently selected record and runs on that record.
Dialog Setup Locations
Dialog setup can be found in two places:
Lasernet > Common > Reports, on the Action pane of the Lasernet Query report.
Lasernet > Common > Reports, in the Form link of a Lasernet Query report.
We will review the Dialog setup button found in the Lasernet Query report’s Form link. This Dialog setup controls the dialog the user sees when they run the Query report from the Lasernet button (Form link).
Dialog Setup Settings
After clicking Dialog setup, a form will be displayed, which includes a Default ranges button and three fast tabs: General, Parameters, and Details.
The General tab contains the following settings:
Execution: Indicates how report dialog shall be used when running a report.
Set focus: Select the control that is supposed to be selected when the form opens.
Submit when modified: Automatically clicks OK after field modification.
In the Parameters FastTab, you can add and customize the parameters on the dialog.
When the Show checkbox is selected for a parameter, the parameter will show as an option on the dialog for the user to possibly modify.
Control name is a Language Text that enables your parameters’ name to translate automatically to the user’s language.
Using Default value you can hardcode a value for this parameter or use the Expression editor to dynamically select the default value.
Range enables the input in the parameter field to be read as a Range rather than a single value.
The Load Instruction column enables you to determine how the parameter field will load when the dialog pops up at a report run:
From last value: The value used in the dialog on the last run of this report will load.
From default – fixed: The value indicated in the Default value column will load and cannot be changed by the user running the report.
From default: The value indicated in the Default value column will load, and the user can change it.
Clear: No value will load.
Lastly, the Details FastTab enables you to set properties on the parameter that is currently selected.
The Lookup group has two fields: Extended data type name and Enum name. If an extended Data type or an Enum name exists in the system that corresponds to the parameter you have added, selecting it here creates a dropdown on the parameter in the dialog for the user to select.
Extended data type name: Name of an extended data type in the AOT.
Enum name: Name of enum in the AOT.
The Default Ranges button on a Dialog setup opens the Default query ranges form for the report. This form allows you to set up ranges and filters for report fields. On a Dialog setup, you can use Default ranges to assign Parameters to fields in your report. This gives the user running the report the ability to filter and control the output of the report.
How to Configure a Form Link Dialog
Form links for custom Queries can be customized through the Dialog setup.
A common use case is the following: a Lasernet button is added to a list page. It is required that the Lasernet button recognizes the record that is selected on the list page and runs the report based on the selected record.
This use case will need to be addressed by configuring the Form Link Dialog setup. Form Links can use the value Forms within the Dialog setup > Default Ranges. Forms provide information about the selected record on the form.
This is useful because using Forms will dynamically identify the selected record when the Lasernet button is triggered, and the Query will run based on this value.
The format for using Forms is the following:
Forms.[FormName].[TableName].[Field]
The following example guides you through setting up a form link dialog setup for a custom Query using the Forms value.
Example: Query with Salestable and SalesLine with a Lasernet button on the SalesTableListPage.
Navigate to Lasernet > Common > Reports and select the report. On the Action pane, select Form links.
Click Dialog setup.
On the dialog that appears, click Default Ranges.
In the Default query ranges dialog, either locate or add the fields that will be used as a range. Clicking the Expression editor button provides the option to dynamically set the range value.
On the Expression editor that appears, open the dropdown on the Select Value field and select Forms.
Open the dropdown again to see the forms list. Select the Form name associated with your form link.
Open the dropdown again to see the tables. Selecting the table provides information about the selected record when the Lasernet button is triggered.
Open the dropdown again to see the fields list for the selected table. Select the field associated with your range. The following example illustrates a report range in which the field SalesID is used from the selected record on the list page when the Lasernet button is clicked.
Click OK to close the Expression editor. Select the Show checkbox on the Default query ranges dialog. This setting is optional.
Click OK to close out of the dialogs and save changes.
Navigate to the form with the Lasernet button. In this example: Accounts receivable > Orders > All sales orders.
Select a record from the form and click the Lasernet button.
On the Print dialog that appears, expand Records to Include to verify the selected record was correctly identified. This will only be visible if Show was enabled previously.
Print the report and note it ran on the selected record.
How to Use Labels and Single Button
Control the Menu Label
When a single button is not used, the form link will appear on a form as a Lasernet menu button with a dropdown selection of multiple buttons.
The Menu label field in the form link’s Properties FastTab will define the label for the Lasernet menu button. The Single button toggle must be set to No to use Menu labels.
Selecting the dropdown will enable you to select a Language Text as your menu button’s label.
Navigate to your Lasernet button and note that the Lasernet menu button displays the value corresponding to the Menu label selected on the form link (in this case, Invoice summary corresponding to @SYS306731). If a Language text was used, this label will automatically translate to the user’s language.
Control the Label
The Label field in the form link’s Properties FastTab will define the label for the Lasernet Print button.
When a single button is not used, the form link will appear on a form as a Lasernet menu button with a dropdown selection of multiple buttons, including the Lasernt Print button.
Review the Single button section of this guide for more information on the Label behavior for single buttons.
Selecting the dropdown will allow you to select a Language text as your menu button’s label.
Navigate to your Lasernet button and note that the Lasernet Print button displays the value corresponding to the Label selected on the form link (in this case, Invoice Summary Print corresponding to @SYS306731). If a Language text is used, this label will automatically translate to the user’s language.
It is possible to hide the Archive option (visible in the image) by toggling the Hide archive button to Yes.
This way, it will not show anymore.
Set up a Single Button
The Single button option on a form link’s Properties FastTab will show the Lasernet button as a single button when it is toggled to Yes.
The single button will have default label Print if the Label field of the Properties FastTab is not defined.
Define the Label on the form link's Properties FastTab to rename the single Lasernet button. Selecting the dropdown will allow you to select a Language Text as your button’s label.
The benefit of using a Language text is that the button’s label will be automatically translated into the user’s language. The following example shows a single button with a label translated into en-us and da.
Condition
You have the option to hide or show the Lasernet button for a Query report by using an expression.
Example
It is also possible to control when users are allowed to click your button or not.
How it looks when active:
How it looks when inactive:
As for standard Dynamics 365 Finance and Operations, the button is disabled.
Follow these steps to set conditions for an active form link:
On the Formlink page, under Condition, select a condition code and then click Edit.
In the window that appears, select Expression from the Expression drop-down combo box.
Tip
After you choose Expression, paste Forms.CustFreeInvoice.CustInvoiceLine.Description <> "Invoiced" to Expression definition. This way, you will not need to go through the configuration described below.
In the Expression definition window, select Forms.
Choose the form name and then the table name.
Once you have defined your field name, it is time to choose <> in AVAILABLE FUNCTIONS.
Click Insert.
To enable the possibility to add the 'Invoiced' status, click Select value.
Type Invoiced and click OK to save all the settings.
The end result should be: