Introduction

Every business thrives on customer feedback. Dynamics 365 Customer Voice provides an effective way to gather this feedback through surveys. By default, Customer Voice survey responses are displayed in a related subgrid on a table like Opportunity. However, when you only have one response per opportunity, it can be frustrating to open the response record each time you want to see the response. In this blog post, we’ll explore a user-friendly solution to embed survey responses directly into the opportunity.

We’ll first discuss why the most obvious approach – using a quick view form – isn’t suitable in this case. Then, we’ll delve into alternative methods that you can implement to achieve this goal, while also explaining the limitations of each method. Finally, we’ll present a working approach that involves cloning existing columns to the opportunity and using the ResponseViewGrid PCF control.

The Quick View Form Conundrum

The first approach that comes to mind for embedding survey responses is using a quick view form. However, this method isn’t suitable because the responses are displayed with a custom PCF control, and you can’t change the control on a quick view.

In the following sections, we’ll explore other methods that can be used to work around this limitation.

The Lookup Column and Form Component Control Approach

One alternative method is to create a lookup column on the opportunity containing the survey response record and display it using the Form Component Control. This allows you to embed main forms, which seems like a viable solution.

Unfortunately, this method also falls short, as the PCF control doesn’t function correctly when embedded into another form, causing an error on load.

The Working Solution: Using the ResponseViewGrid Control

To successfully embed survey responses in Dynamics 365 tables, you can create a multiple lines of text column on the opportunity and use the same PCF control with the name ResponseViewGrid, which is used in the survey response, to display it. This pcf control requires two specific columns to exist on the form, so you’ll need to manually recreate them with the same name.

The Required Columns: msfp_embedcontextparameters and msfp_sourcesurveyidentifier

The first column required is called msfp_embedcontextparameters, and the second is msfp_sourcesurveyidentifier. Both columns have the type single line of text. To ensure the prefix is the same, you could create a new solution that uses a publisher with the same prefix.

Alternatively, you can use the Clone Field Definition Plugin from XrmToolBox to clone the required fields. In this case I also cloned the msfp_questionresponselist column to use it as the multiple lines of text column.

Hiding and Filling the Columns on the Form

You can make both of the required columns hidden on the form and fill them using a workflow when a survey response is created. This ensures a seamless user experience without cluttering the form with unnecessary fields.

Pros and Cons of the Working Approach

The working approach we’ve presented has several advantages. It allows you to embed survey responses directly into the opportunity, bypassing the limitations of the quick view form and the lookup column methods. Additionally, it provides a more user-friendly solution, streamlining the process of viewing survey responses.

However, this method requires manual recreation of specific columns, which can be time-consuming.

Conclusion: A User-Friendly Way to Embed Customer Voice Survey Responses

In conclusion, embedding Customer Voice survey responses directly into Dynamics 365 tables can be achieved by creating a multiple lines of text column on the opportunity and using the ResponseViewGrid PCF control. While the initial setup may require manual recreation of specific columns and some additional effort, the resulting user-friendly solution offers a more streamlined approach to accessing survey responses.

By following the steps outlined in this blog post, you can eliminate the need to open individual response records and improve the overall user experience. This not only saves time but also allows you to focus on understanding customer feedback and making informed decisions for your business.