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:
|
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).
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.
-
- 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.
- 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.
- 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.
- From the shortlist of libraries select the qgpbi_LookupSupport.js library and click the Add button.
- Click OK to close the Form Properties dialog.
- 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.
- Having established the Parent Contact field is on your Entity form, double click on it to view the Field Properties dialog for this field.
- 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.
- 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.
-
- Click OK to close the Handler Properties dialog.
- 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).
- Once complete click OK to close the Field Properties dialog.
- When back at the Entity form layout window, click Save and then Publish to commit your changes.
- Close the Entity form.
Related Resources: |
|
Further Information: |