Install and Configure the Autoform DM Iframe Integration
    • 01 Nov 2024
    • 3 Minutes to read
    • Contributors
    • PDF

    Install and Configure the Autoform DM Iframe Integration

    • PDF

    Article summary

    This page provides all the installation steps that you must follow to implement the Autoform DM integration.

    The installation process has the following stages:

    1. Navigate to the Customization page.

    2. Add the integration script to a form.

    3. Add an event handler to initialize the script.

    4. Add a tab with an iframe component.

    5. Add an application initialization event handler.

    Before you begin: Ensure that you have read the prerequisites and solution summary for this integration.

    Navigate to the Customization Page

    1. Within Dynamics, click Advanced Settings in the drop-down menu in the top right.

    2. In the Settings menu, click Customizations.

    3. Click Customize the System.

    4. Navigate to the target entity, and then navigate to the form in which the integration is to be done.

    Add the Integration Script to a Form

    To run the integration functions, the integration script must first be added as a library to the target form.

    Note

    The upload step only needs to be performed once. If the integration is to be performed on other forms, the global script library can be reused.

    1. Click Form Properties.

    2. In the Form Properties window, under Form Libraries, add a library.

    3. If the integration script has not yet been uploaded, click New, then follow these steps:

      1. In the form that is shown, set the Name to formpipe-dmintegration (or another descriptive name as required).

      2. Set the Display Name and Description as required.

      3. Set the Type to Script (JScript).

      4. Upload the provided integration script.

      5. Click Save to save the library.

    4. Ensure the integration script library is selected, and then click Add to add it to the form.

    Add an Event Handler to Initialize the Script

    To initialize the integration script, an event handler must be added. This task:

    • Must be done once per form.

    • Must run before any iframe initialization calls.

    1. Click Form Properties.

    2. Under Event Handlers, set the Control to Form and set Event to OnLoad.

    3. Choose to add a new event hander.

    4. Select the integration script library that you added (when you followed the steps in Add the Integration Script to a Form).

    5. Set the Function to FpApp.Embed.initEmbed

    6. Set the parameter to a quoted string (single quotes) containing the full URL to Autoform DM. For example, 'https://my.dmappdomain.com'

    DM%20iframe%204%20edit

    Add a Tab with an Iframe Component

    In order to embed a DM application within a form, an iframe component must be used. This can be done in whatever manner best fits the integration requirements and usage. However, we recommend using a single column tab to host the iframe to provide the best end-user experience.

    1. Insert a new single-column tab into the form.

    2. Within the new tab, ensure that a section exists. If one does not, add a section.

    3. Within the section, insert an iframe component.

    4. In the iframe configuration window, set the Name to a value that represents the application to be embedded. For example, dm-statements-search

    5. Set the URL to the canonical dummy url: https://www.example.com

      Note

      This URL will not be used.

    6. Enter an appropriate Label.

    7. Ensure that the Restrict cross-frame scripting option is not selected. If this option is enabled, the application will not work.

    The iframe will act as a container into which the DM application is loaded, via initialisation functions described in the next set of steps.

    Add an Application Initialization Event Handler

    For each iframe component that will host a DM application, an event handler must be added to initialise and load it.

    1. Click Form Properties.

    2. Under Event Handlers, set the Control to Form and set Event to OnLoad.

    3. Choose to add an event handler.

    4. Select the integration script library that you added (when you followed the steps in Add the Integration Script to a Form).

    5. Ensure that the Pass the execution context as first parameter option is selected.

    6. Set the function call and parameters based on the type of application that is to be embedded:

      • Search Application Parameters

        • Function: FpApp.Embed.initSearchIframe

        • Parameters:

          • <IFrame name> (without IFRAME_ prefix)

          • <DM application ID>

          • <Field mapping> — An object map where each key-value pair is an application search input name and a Dynamics form field name

        DM%20iframe%207%20edit

      • Import Application Parameters

        • Function: FpApp.Embed.initImportIframe

        • Parameters:

          • <IFrame name> (without IFRAME_ prefix)

          • <DM application ID>

          • <Field mapping> — An object map where each key-value pair is an import input field name and a Dynamics form field name

    Next Steps

    To avoid creating a Dynamics configuration that prevents the integration from working correctly, read Dynamics Security Controls.

    To learn about the various attack vectors present and (for each) to learn about the risk and whether there are safeguards in place to prevent it, see Iframe Attacks and Preventions.


    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.