Saturday 19 November 2016

Use CRM Dialog to set a lookup value from a list of records

Use CRM Dialog to set a value

Hi All. In CRM, sometimes we face a requirement where we have to select a lookup record from a list of records and then set it to some field.

Here I am going to explain how to use a CRM - Dialog to set a lookup field by selecting a record from a list of records.

Lets take an example. I have a lookup field "Manager" (lookup of User). I want to show a list of System Users with some filter criteria. The CRM user will select a record from the list and then this selected record will get set to the field "Manager":
  Step 1: From Customization, create a new Process and select the category as "Dialog":


Step 2: Add step "Query CRM Data":

Step 3: Select the entity "User" and add the filters and save it:

Step 4: Add a page to display Prompt and Response.

Step 5: Select the row and add Prompt and Response. Set the properties as shown below:

 Step 6: Add a new step to update the Account record and click on set properties:


Step 6: Click on Manager to select this field. On the right hand side, select "Select Manager (User)" and click on OK as shown below:





After clicking on OK, the value gets set to Manager.



 Now the properties of dialog looks like below:


Step 7: Open the Account record and select the "Start Dialog". A list of dialogs is shown up. Select "Dialog - Set Manager of Account":


 Step 8: The dialog gets opened. Select any User and click on Finish. The value will get set to the field "Manager":

 Now the value gets set to the field as shown below:

 This is how the CRM dialog works to set a value from a list of records.