Configuration
    • 29 Feb 2024
    • 9 Minutes to read
    • Contributors
    • PDF

    Configuration

    • PDF

    Article summary

    Create a Class Report

    It is now necessary to create a report which can be run from within CE.

    In this scenario, a quote report will be used.

    The system needs to be configured in such a way that a user in CE, with security privileges and access in CE only, can click a button on the Sales Quotation form in CE and see a report delivered to their screen.

    Create the Query in FO

    To create the query in FO, the process is exactly the same as creating the test report when we validated the connection in the previous step. Follow these steps:

    1. Navigate to the Lasernet > Common > Reports.

    1. Click New.

    1. On the newly created Query, define the following:

    • Origin should be Class.

    • Report design name should be CESalesQuotation.

    • Active checkbox should be selected.

    1. Save the Query.

    1. On the Archive tab of the report, define the following:

    • Archive to Default.

    • Destinations to archive to All.

    • Save XML button should be selected.

    1. Save the Query again, then navigate to the Query wizard.

    1. Click Next.

    1. In the Connection drop down, select the CE connection which was configured in the previous steps, then click Next.

    1. From the Report Sources tab, select the data sources that will be needed for the Sales Quotation report. To select an Entity, search for it in the search bar, highlight the row and then use the right arrow in the centre of the screen to send the data source into the Query.

    1. Continue adding data sources based on the requirement for your report, in this example Quotes, Quote Details and Accounts have been added as data sources.

    1. In this example we are also going to add a data source from FO, so under Related entities in the drop down, select All tables.

    1. Search for the CustTable and add it to the query under the accounts entity.

    Define the Relation Using the Query Wizard

    Now there are data sources in the query from both CE and FO. However, because these data sources are from different systems, they do not have a native relation to each other so the relation needs to be defined in the Query wizard.

    1. Select the CustTable data source, and on the Relation tab select New.

    1. Here we need to define what the relation between the two tables is. In this instance it is going to be the account number fields - in CE this is accountnumber and in FO this is AccountNum.

    1. Select the appropriate fields from the drop-down and click Next.

    The next screen displayed is similar to the first but rather than having all the data sources in the system on the left, and the data sources in our Query on the right, this screen has all the Fields from the data sources in our Query on the left, and the Fields we have selected for our Query on the right. For FO tables this will always include the Recid.

    1. Select the fields from the left-hand side which we want to add to our query on the right. For this example, we have added some generic information about the quote and account from CE and added the address from the Customer in FO.

    1. Here you can experiment by adding different data based on your individual requirements for a Sales Quotation document, then click Finish.

    1. This class report is now created, and ready to move on to the next step. If you want to check the data which your Query is going to fetch and maybe add more or remove fields you do not need then you can do this by clicking on Run report.

    1. Accept the defaults and click OK. The Report is not recognized output will be shown, which is expected because no Lasernet form has been set yet.

    1. Click Show XML.

    Create an Entity Report

    To let FO know when to run the Class report, it is necessary to set up an Entity report that listens to the messages coming from CE and uses them to identify which query to run in FO.

    To set this up, follow these steps:

    1. Navigate to Lasernet > Setup > Dataverse/Dynamics 365 > Entity reports.

    1. Click New.

    1. Select the test report that was created in the previous steps in the dropdown for Report name.

    1. Set the Active and Recording buttons to Yes and then save the changes in the form.

    1. This Entity Report is now ready and waiting to receive a message from CE when the user runs the report.

    Create an Odata Dialog

    To create the Odata Dialog in CE which sends the message to the entity report, follow these steps:

    1. Navigate to the CE instance which is being linked to FO and navigate to Advanced Settings.

    1. In Advanced settings, click the dropdown next to Settings and navigate to Odata Dialogs.

    1. Click New. The OData Dialog form will be displayed for you to enter some details.

    a. Name - This needs to be a description. Define a naming convention your organization will use for these dialogs. In this example, it will be named the same as the class report it is going to run in FO.

    b. Button Text - This is the text that will show on the screen for the user to click on. In this example, it will be Quote.

    c. Multi Select - Leave this as No.

    d. OData Endpoint - This should be the URL of the FO environment, followed by this text: /api/services/LACCRMServiceGroup/LACCRMReportExecuteService/newReport

    e. OData Submit Endpoint - This should be the URL of the FO environment followed by this text: /api/services/LACCRMServiceGroup/LACCRMReportExecuteService/executeReport

    f. Azure Client id - This can be copied from FO or the app registration. In FO it can be copied from Lasernet > Setup > Dataverse/Dynamics 365 > Lasernet Dataverse/Dynamics365 Setup.

    g. Azure Client Secret - This can be copied from the same place as the client ID above, use the view button to see the secret value:

    h. Authority URL- This can be found in the same place as the client ID and secret:

    i. Authority Resource URL- This is the URL of the FO environment- it can just be copied from the browser.

    1. Once these fields have all been filled in following the instructions above, click Save (in CE the Save button is in the bottom right-hand corner of this form) and the form will look like this:

    Two more things must be configured on this form, the Pass Through Data and the Pre-Fetch Print Dialog options.

    5. The Pass Through Data is what will be used to match this Odata Dialog to the entity report in FO, so give it a unique value - in this instance we will use quote.

    6. The Pre-Fetch Print Dialog option should be set to Yes.

    Create Menu Items in CE

    For the user to be able to run the report from the user interface in CE, the following areas need to be configured:

    • Criterion - This is a rule that defines where a group or flyout can be displayed in the system.

    • Groups - A group of OData Dialogs.

    • Flyouts - A drop-down list containing a number of different groups.

    To create the Criterion, follow these steps:

    1. Navigate to the Advanced Settings > Criterion.

    1. Open the Criterion, and from the list page click New.

    The first criterion which is created is going to be Deny All, then a second criterion will be created to allow the group to be shown on specific forms.

    1. Set the Name as DenyAll and then set the Criteria Type to Deny.

    1. Save this criteria, then create a New criteria.

    1. Set the Name as AllowQuote and then set the Criteria Type to Allow and the Primary Entity Type as quote and then Save this criteria too.

    Note

    The Primary Entity Type is important to get right. It is case-sensitive and needs to be the Logical Name of the entity/table in CE. You can find it from the list of tables here:

    or on the Table itself as the Logical name:

    Create a Flyout

    To create a Flyout, follow these steps:

    1. From the Advanced Settings menu, select Flyouts.

    1. Open the Flyouts form and click New.

    1. On the form that is displayed, give the Flyout a sensible name.

    1. Click the symbol on the Lasernet Criterion section and add both criteria that were created in the previous step.

    Once selected, the Lasernet criterion tab should look like this. The order is not important here:

    1. Save the Flyout.

    Create the Group

    To create the Group and link all of the configurations together, follow these steps:

    1. Navigate to the Advanced Settings menu and select Groups.

    1. Open the Groups form and on the list page click New.

    1. In the Name field type in Quotes Group and then click Save.

    1. Link the new Quotes Group to the Flyout by scrolling down to Lasernet flyouts/groups(Groups) and clicking on the symbol.

    The following window will be shown:

    This form is defining the link between the Flyout and the Group:

    a. Name - Give the link record a sensible name. It makes sense to decide on a naming convention for your organization to use with all of these records.

    b. Flyout - Using the magnifier in the drop downs, select the Sales Quotation Flyout that was created in a previous step.

    c. Group - In the same way as above, select the Quotes Group which has just been created.

    d. Order - Set this as 1.

    1. Save the record and close the form.

    The Group also needs to be linked to the OData Dialog.

    1. Scroll further down the page to the Lasernet groups/OData Dialogs(Group).

    1. Click the symbol and the following screen will be displayed:

    This form defines the link between the Group and the OData Dialog.

    a. Name- Give the link record a sensible name. It makes sense to decide on a naming convention for your organization to use with all of these records.

    b. Group Select the Quotes Group which was previously created.

    c. OData Dialog- Select the CESalesQuotation dialog which was previously created.

    d. Order- Set this as 1.

    1. Save the record.

    1. In order to check this configuration, navigate to the Quotes entity in CE.

    1. Open one of the Quotes to view the Quotes Form.

    In the Quotes form, there is now a Lasernet button, with a Flyout menu that displays all the OData Dialogs that are in the linked Group.

    1. Confirm that the criterion is working correctly by navigating to the Accounts entity in CE.

    1. Select an Account and double-click it to open the Accounts form.

    No Lasernet button is shown.

    Recap - What Has Been Configured

    For the communication between CE and FO to work, a number of things need to be configured. Assuming that the environments, licenses, and users have been properly configured, check that the following steps have been carried out before moving on:

    Azure

    Within Azure we need to configure:

    • App Registration with the client ID and client secret generated and other config as per the guides

    Power Platform

    Within the Power Platform we need to configure:

    • CE Application User with correct security privileges and with the correct application linked.

    Finance and Operations

    Within Finance and Operations we need to configure:

    • Dataverse/Dynamics 365 connection with the correct information copied into the connection.

    • App Registration User with the client ID assigned to them.

    • Connection - add the new dataverse connection to the connections form.

    • Class Report to get the information from CE.

    • Entity Report to define what happens to the message from CE in FO.

    Customer Engagement

    Within CE we need to configure:

    • Create an Odata Dialog - This is where we define how we are going to send the message between CE and FO.

    • Create CE Menu Items - This is how we allow the users to have a button to click to run the report. This requires Criterion, Groups and Flyouts and that all these records be linked properly.