--- title: "Use Direct OData Submit and Direct Button with Workflow" slug: "use-direct-odata-submit-and-direct-button-with-workflow" description: "This article describes the steps required to set up a workflow in CE to invoke the plugin for submitting printing contracts to FO." tags: ["Direct button", "Customer Engagement", "Lasernet CE Connector", "Finance and Operations", "OData", "Workflow"] updated: 2025-11-13T09:01:46Z published: 2025-11-13T09:01:46Z canonical: "kb.lasernetgroup.com/use-direct-odata-submit-and-direct-button-with-workflow" --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.lasernetgroup.com/llms.txt > Use this file to discover all available pages before exploring further. # Use Direct OData Submit and Direct Button with Workflow This article outlines the steps required to set up a workflow in Dynamics 365 Customer Engagement to invoke the plugin for submitting printing contracts to Finance and Operations. This will enable an OData dialog printing contract to be sent to FO in response to an event in CE. > [!NOTE] > Note > > Two ways exist to invoke the logic in FO without user interaction, by using either a direct OData submit or a direct button which then invokes direct OData submit. The advantage of using the logic for direct buttons is that it is not needed to hardcode the process/caller to a direct OData submit record ID. Instead, it is mapped to the control ID on the Lasernet button form, which then maps to the direct OData submit or HTTP method. Performance is enhanced when using direct OData submit, however, it is easier to maintain a direct button. ## Use Direct OData Submit 1. Create a **Lasernet Direct OData Submit** record. We recommend testing and confirming that it is working by attaching it to a flyout or button. 2. Obtain the ID of the **Lasernet Direct OData Submit** record. Several ways exist to obtain the **Record Id**, such as using the Power pane Plugin in the browser or copying it from the URL. In the following example, the URL is used: ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-QF6WNRFW.png) 1. Create a new process/workflow for the entity in question. If this process is an action and you want to use it in a **Business Process Flow**, select the **As a Business Process Flow** action step checkbox and the **As an on-demand process** checkbox if required. 1. Add the **Lasernet.Unified.Printing.Activities.ODataDirectSubmit** step. 2. Fill **The ID of OData Direct Submit** field with the ID found in step 2. 3. Set **Inbound serialized contract (will be returned)** to a **JSON** object. **OrgName** must be added, as it is currently a requirement in FO (either hardcode or using arguments). **OrgName** can be found in the **Developer Resources** area under **Settings** > **Customizations**. The JSON object will be sent to FO, where it can be used for report mapping and filtering. You can also set the remaining optional fields. 1. Add your logic to the process, set the start time, and activate it. ### Optional #### Option 1: Set Properties for Workflow Activity for Lasernet.Unified.Printing.Activities.ODataDirectSubmit ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-0SFY0MTL.png) #### Option 2: Add a Workflow Action and Specify OdataDirectSubmitId and Inbound Contract ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-TFKIHE3T.png) ## Use Direct Button with Workflow 1. Create a Lasernet button and assign a meaningful, unique name to **controlId**. This will be the ID that is matched in step 5. 2. Create a **Lasernet Direct OData Submit** record and assign it to the button. We recommend testing the button to confirm that it is working. If you do not want the button to be displayed, hide it using a dummy criteria that matches nothing (for instance, entities that do not exist). Apply the same criteria to the properties of the process step (primary and/or selected entity) in step 5. 1. Create a new process for the specified entity. If this process is an action and you want to use it in a **Business Process Flow**, select the **As a Business Process Flow** action step checkbox. Select the **As an on-demand process** checkbox if required. 2. Add the step **Lasernet.Unified.Printing.Activities.DirectButton**. 3. Fill **The ID passed on from the control** field with the **controlId** that you added in step 1. 4. Set **The data which are to be sent** to a **JSON** object. Add **OrgName**, as it is currently a requirement in FO (either hardcode or using arguments). The **JSON** object will be sent to FO, where it can be used for report mapping and filtering. > [!NOTE] > Example > > {"AccountID": "{Account Number(Account)}", "OrgName": "orga12345" , "InvokedFrom": "MyAccountWorkflow" } The part highlighted in yellow is added from the Account entity. You can also set the remaining optional fields. 1. Add your logic to the process and/or set when it should be started. 2. Activate it.