Please wait, loading...

 

Store source of survey or Mapping context variable value to Question Response in Dynamics 365

June 2, 2020

In this post, We will store source from the context variable field to Question response in dynamics 365.

The requirement is to store SOURCE of an anonymous survey

  1. We rendered form in website passing source value
  2. Now we will create a Power automate flow, On receive of survey response

    • Selecting Action as Parse JSON
    • Selecting Context Data

    • Now we will generate a schema from the sample, Going to an already received Response record in Dynamics 365
    • Then copy the context and Generate Schema

  3. Get Hidden Question “Source”  form pro survey Question entity where name  = “Source”
    NOTE: THIS IS NOT MANDATORY YOU CAN MAP IT WITH ANY OTHER EXISTING RESPONSE IF NEEDED

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5ed52b73cf8fd.png?fit=1257%2C768&ssl=1

Last Step is to add create new Forms pro question response

    1. Now we have our Received survey Response
    2. Survey Question = Source
    3. As our question was hidden and there was no answer, there will not be source Survey Question Response (We got a question in above step now we will map that question with this response)
    4. We will create  source Question response and associate it with received survey response
    5. To get Source Question identifier and Question for  Source(replace name) use below expression, As we have used fetch list of record where Question = source, we need to take 1 record only otherwise we have to use Apply to all (loop)

    body(‘Get_Recipient_question’)?[‘value’]?[0]?.msfp_questionid

Testing: When a survey response is received, Power automate will create a Forms Pro Survey Question response in CRM with Value passed in context

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5ed697cb5dc85.png?fit=1561%2C500&ssl=1

FULL POWER AUTOMATE FLOW

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/Microsoftdynamics365.png?fit=640%2C651&ssl=1
Microsoft Dynamics Community Profile

Learn more