Skip to main content

How do I Use Dialog Setup? - Knowledgebase / Lasernet FO Connector / Lasernet FO Connector FAQs - Formpipe Support Portal

How do I Use Dialog Setup?

Authors list
 

When you run a query report in Dynamics 365 Finance and Operations, a dialog will appear allowing you to make selections such as the Destination, Records to Include, and the Run Report in Background options. Dialog Setup is a Lasernet Connector function that allows you to customise this dialog to fit your needs. This article provides an introduction on how to use Dialog Setup. For a more in-depth explanation of all the different settings and capabilities of Dialog setup, please reference our Form links – Dialog setup and Query – Dialog setup sections of our guide. 

Dialog setup locations

Dialogue Setup can be found in two places:

Lasernet > Common > Reports, on the action pane of the Lasernet query report and on the Form link of a Lasernet query report.

Lasernet > Common > Reports, on the Form link of a Lasernet query report.

We will review the Dialog Setup on the action pane of the Lasernet query report. This Dialog Setup controls the dialog the user sees when they run the query report from Lasernet > Common > Reports > Run Report on the action pane.

Example Dialog setup configuration

Prerequisite: We have created a custom query report called 'CustomerInvoiceReport'.

1. Navigate to Lasernet > Common > Reports, select CustomerInvoiceReport and on the action pane, select Dialog setup.

2. Select Default for Execution, leave Set focus blank, and set Submit when modified to No.

Create a new Parameter:

 To add a new parameter,  follow these steps:

1. Select New and provide a Control Name

2. Select the checkbox for Show, choose a Default value and select From las value for the Load instruction field.

Set up a Default Range using a Parameter

To set up a Default Range using a Parameter, follow these steps:

1. Click Default ranges.

2. Add a line for table CustTable and field AccountNum. 

3. Scroll to the right and select the Expression Editor button.

The expression editor will open. 

4. In the Selected value field, click the dropdown and select Parameter

5. Click the dropdown again and you will now see all the Dialog Parameters available for selection.

6. Select the new parameter and click Ok to close the expression editor. 

7. Click Ok in the Dialog setup to close the Dialog setup.

8. On the action pane click Run report.

You will now see the new parameter. You can type in a value before selecting Ok to run the report.

The report will run, using the value you have entered in the dialog as a filter on the corresponding table.

Use Extended data type

To use the Extended data type, follow these steps:

1. Open the Dialog setup again and select the new parameter. 

2. In the Details fast tab, open the dropdown for Extended data type name, select CustAccount and click Ok.

3. On the action pane click Run report. The dialog will appear. 

4. Select the dropdown arrow for the Parameter and you will now see a selection of Account numbers in the system.

5. Select a value from the dropdown and click Ok to run the report. 

The report will run using the value you have selected in the dialog as a filter on the corresponding table.

Use custom Enum fields and Single Select

You can customize the dropdown list the user sees on a dialog setup by using custom enum fields. To use the custom Enum fields, follow these steps:

1. Open the Dialog setup again and select the parameter. 

2. In the Details fast tab, ensure the Extended data type and Enum name are blank as we will create custom Enum fields.

3. On the Default Value, define your custom enum fields by typing in each field in the following format: [Name]#[Value] Where the name is the field option the user will see and select. And the value is the value the name represents.

In the image below we have the customer account name as the Name and the account number as the value. Each option is separated by a comma.

4. Define the Multiple value type. Select Single select to limit the user to selecting one value and click Ok.

5. On the action pane click Run report. The dialog will appear. 

6. Select the dropdown arrow for the Parameter and you will now see a selection of the Account number values you defined in the Dialog setup.

7. Select a value from the dropdown and click Ok to run the report. 

The report will run using the value you have selected in the dialog as a filter on the corresponding table.

Use 'Multiple values' field

In the previous section, we used custom Enum fields with Multiple value type Single select. Multi-select allows the user to select more than one option.

To use the custom Multi-select, follow these steps:

1. Open the Dialog setup again and select the parameter. 

2. In the Details fast tab, set the Multiple value type to Multi-select and click Ok.

3. On the action pane click Run report. The dialog will appear. 

4. Select the dropdown arrow for the Parameter and you will now see a selection of the Account number values you defined in the Dialog setup with the option to select multiple values.

Select multiple values and Ok to run the report.

5. The report will run using the value you have selected in the dialog as a filter on the corresponding table.

Use a Range and System functions

You can use user input to filter on a range of values for your report. For example, when running a report on a date range. It is also possible to filter on a UtcDateTime field value using System methods.

To achieve this by using system methods and the expression editor, follow these steps:

1. Open the Dialog setup and add two new parameters. One for the From date and one for the To date.

2. Add an extended data type name for each of the newly added parameters. Use FromDate for the From parameter and ToDate for the To parameter.

3. Select Default Ranges and add the table and relevant date field that will be filtered. Open the expression editor.

4. Add the following system functions unless they already exist. Select Add system function and find the Class name and Method Name and click Ok to add these to the list of available functions:

  • Global:: datetobeginUtcDateTime(..)

  • Global:: datetoendUtcDateTime(..)

  • DateTimeUtil:: getUserPreferredTimeZone(..)

5. Create the following expression:
datetobeginUtcDateTime ( Parameter.From , getUserPreferredTimeZone( )  )+ ".." + datetoendUtcDateTime ( Parameter.To ,getUserPreferredTimeZone ( ))

Warning

Results may vary depending on whether a user time zone is specified or not.

6. Click Ok to save changes and close out of the Dialog setup. On the action pane click Run report. The dialog will appear.

7. Select the calendar icon and you will now see the option to select a date. Populate the From and To parameters and run the report.

8. The report will run using the values you have selected in the dialog as a filter on the corresponding tables.

Warning

When running the report an error is thrown back: “Error in Query wizard - Lasernet can't display SQL call that has expression in it and throws an error.”

This is just a display error, not a functional error.


Helpful Unhelpful

2 of 4 people found this page helpful

Add a comment

Please log in or register to submit a comment.

Need a password reminder?

Share