Paribus 365 Featured Image

Adding Account Lookup Functionality to Forms in Microsoft Dynamics 365

Summary: Adding account lookup functionality to forms. This article outlines the steps required to add the functionality of the Paribus Interactive™ Lookup support to auto populate Account lookups from the parent Account of a chosen Contact.
Article Type: How-To Guide
Related Product(s): This article relates to the following products:

  • Paribus Interactive
  • Microsoft Dynamics 365
  • Microsoft Dynamics CRM


About

This article outlines the steps required to add the functionality of Paribus Interactive™ Lookup support to auto populate Account lookups from the parent Account of a chosen Contact (e.g. when selecting a Contact from Paribus search results, to auto populate the CRM entity form with both the selected Contact and related Account).

This feature can be set up for any Contact/Account lookup combination on any CRM entity. This guide will follow the steps for adding this functionality to the CRM Lead Entity form.

What is the issue?

Currently, when using Paribus Interactive™ to qualify a Lead, selecting a Paribus search result will allow you to populate the “Existing Contact” field. However this single action does not automatically populate the related Account (e.g. The Account from the selected Contact). By adding this additional Lookup Function, Paribus Interactive™ will auto-populate the associated Account (e.g. Existing Account field).

Adding Account Lookup Functionality to Forms in Microsoft Dynamics 365
Figure 1 – CRM Lookup Paribus Auto-Populate / Combined

The Solution

From within the Dynamics 365 Customization section, locate the Entity form you wish to apply this capability to and select/open it for customization.

In this how-to guide tutorial we will be using the standard CRM Lead Entity form for illustration, however these steps can be applied to any CRM entity form where Account and Contact Lookup fields apply.

Figure – 2 CRM Lead Entity Form
    1. The first step is to ensure that the Entity Form Properties contains a reference to the Paribus Interactive support library for this lookup feature.  Select the Form Properties option (Form Properties icon in the toolbar) – this action will present the Form Properties dialog.

      Figure 3 – Form Properties Dialog
    2. From within the Form Properties dialog locate the Form Libraries section and click the Add option. This action will present a dialog of available Libraries.
    3. Set the Search field within this dialog to  qgpbi  and click the magnifying glass icon, this will shortlist the available libraries to only those relating to Paribus Interactive.

      Figure 4 – Lookup Library Selection
    4. From the shortlist of libraries select the  qgpbi_LookupSupport.js  library and click the Add button.
    5. Click OK to close the Form Properties dialog.
    6. Make sure that the Contact lookup field that you wish to add lookup support to exists on your Entity form.  If it does not then simply add it from the list of available fields on the right. In this example (CRM Lead), we require the Parent Contact for Lead field.

      Figure 5 – CRM Entity Form (Contact Lookup)
    7. Having established the Parent Contact field is on your Entity form, double click on it to view the Field Properties dialog for this field.

      Figure 6 – Field Properties Dialog
    8. From within the Field Properties dialog select the Events tab.  Within the Event Handlers section ensure the Event is set to OnChange and click the Add option – this action will display the Handler Properties dialog.

      Figure 7 – Field Handler Properties Dialog
    9. From within the Handler Properties dialog define the following:
        • Set Library to:  qgpbi_LookupSupport.js
        • Set Function to:  SetAccountFromRecord
        • Enable Handler
        • Enable Pass execution context as first parameter option
        • Add “parentaccountid” as a paramter value

      Warning – if copying and pasting the value from the above line, ensure to replace the quote marks from the keyboard after pasting into CRM.

    10. Click OK to close the Handler Properties dialog.
    11. The Contact Lookup field must reside within your Entity form for this feature to operate, however if you do not wish to display this field within your Entity form then un-check the “Visible by default” option (under Visibility on the Display tab).
Figure 8 – Field Properties (Field Visibility)
  1. Once complete click OK to close the Field Properties dialog.
  2. When back at the Entity form layout window, click Save and then Publish to commit your changes.
  3. Close the Entity form.


 Related Resources:
  • None
Further Information:


See the Paribus Help Center User Guidelines for important considerations of use.