- Print
- PDF
How Do I Set Up a Printing Contract Between CE and FO?
This article guides you through the process of setting up a contract between Dynamics 365 Customer Engagement and Finance and Operations.
Note
A printing contract is an established relationship between the executing party in Dynamics 365 Customer Engagement (the ex button or the directsubmit button) and a specific report within Dynamics 365 Finance and Operations.
Before you start setting up a printing contract, you must create a connection between Dynamics 365 Customer Engagement and Finance and Operations. For more details, see the Create Connection in Finance and Operations section of the Lasernet CE Connector Installation Guide.
Create a Class Report
Start by creating a class report that fetches the CRM data in the Finance and Operations. To do this, follow these steps:
In Finance and Operations, navigate to Modules > Lasernet > Common > Reports.
On the Reports page, click the New button.
Within that new record that appears in the list, select Class as a report origin, enter a report name, and then select OData as a report design name.

Once you are done, the ODATA REPORT WIZARD opens, which will help you build a report core structure. To this end, follow each step of the wizard, defining the information you need. Therefore, select a connection name to define the OData connection to the Customer Engagement environment.
Define the tables from which data is to be fetched.
It is possible to combine the data from both Customer Engagement and Finance and Operations in the same Query/report.
The following is a list of options related to reports using the class as an origin:
Run report from Finance and Operations and only use data from Customer Engagement.
Run report from Customer Engagement and only use data from Customer Engagement.
Run report from Finance and Operations and use data from both Finance and Operations and Customer Engagement.
Run report from Customer Engagement and use data from both Finance and Operations and Customer Engagement.
Most of the features in Lasernet FO Connector are supported by data/fields from Customer Engagement, and this data can be added either via the Query wizard or the Expression.
The report you have created is to be further executed. Running the report is possible when OData Dialogs or OData Direct Submit is correspondingly configured. You can trigger this report using Lasernet CE Connector.
Configure OData Dialogs
As prerequisites to the configuration process, OData Dialogs must be added to the flyout menu. For more details, refer to the Create a Flyout Menu article. Then, follow these steps:
In Customer Engagement, on the Sales menu, click the down-pointing arrow to open the navigation menu flyout. Under the Settings flyout, locate the Lasernet list, and then click OData Dialogs.
The Active Lasernet OData Dialogs page opens.
Click the New button to add a new OData Dialogs connection and define when to trigger a report in Customer Engagement.
The following is an example of the OData Dialogs configuration:

As a result, you have created an action that allows executing a report in Finance and Operations. When the corresponding button is clicked in Customer Engagement, this action is applied, and the report is executed.
Users now need to verify that the required settings are defined in Finance and Operations and that the system performs properly when a report is triggered in Lasernet CE Connector.
Note
While specifying URLs (including Authority resource URL), avoid trailing slash (/) character at the end to avoid issues with the dialog not being able to find the printing contract.
Entity Reports
Switch back to Finance and Operations and create a printing report between Finance and Operations and Customer Engagement. Follow these steps:
In Finance and Operations, navigate to Lasernet > Dynamics 365CE > Entity reports.
Click the New button.
Specify a report name. Toggle both the Active and Recording buttons to Yes. Once you are done, click the Save button.

Note
The Recording status allows to log your next actions and set up a rule that you can use the next time when performing the same actions.
Switch back to Customer Engagement. On the Sales menu, click the down-pointing arrow to open the navigation menu flyout. Under the Settings flyout, locate the Collateral list, and then click Quotes. In the Quotes list, click the required quote item to open it.
Click Lasernet, and then click the button that allows opening a form connected to Finance and Operations. In the following screenshot, it is the Dialog(Group) button. You give a name to this button while configuring OData Dialogs by specifying a value in the Button text box on the OData Dialogs configuration page.

In the window displayed, click the Refresh button. As a result, a form connected to Finance and Operations opens.
As you can see in the message, the requested parameters have been recorded.

Switch back to Finance and Operations, navigate to the Entity report page, and click the Refresh button.
As you can see in the following screenshot, the Criteria list is populated with records that have been sent from Customer Engagement to Finance and Operations.

In the Criteria list, locate the PrimaryEntityType criterion denoting a quote and check the Check checkbox for it.

By selecting the primary entity type and specifying it as a quote, you define that the report you are currently creating is to run every time when a quote is sent. To avoid sending all the quotes available in the system, you must apply a filter by defining a report range.
Report Ranges
In Finance and Operations, on the page of the entity report you create, click Default ranges.
On the Inquiry pane that appears, click the New button.
Specify a data source as well as a field name for the range.
Once you are done, click the settings button to specify the range itself.

On the Range pane that appears, click Delete all, and then click the + (plus) button.
On the Segment pane that appears, specify the required value.

Once you are done, click OK on each pane. Before saving the changes you have made, toggle the Recording button to No, and then click Save.
Every time you click Dialog(Group) under Lasernet in Customer Engagement, the report with the parameter you have specified is run.

Additional Information
You can run into a filter error when running the report:

There is a stripped and a non-stripped ID:

Follow these steps to stop the error:
Navigate to Lasernet > Dynamics 365CE > Entity reports.

Under Report ranges, click Default ranges.
Validate/add that the primaryItemIds is being used.
