Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Answered

Update the values stored in optionset for Omnichannel Pre-Chat Survey Question using Javascript/Flow

(0) ShareShare
ReportReport
Posted on by

So currently the optionset values for omni channel Pre-chat survey dropdown is a static list.

My requirement is to update this dropdown using flow/javascript when there is change in one of the entities.

This is the question and the static list is maintained in the option values. I have a finding that these questions are stored in msdyn_surveyquestions entity, but this static list is not stored here. Can anyone tell me where this static list is stored (in which entity or which field.)

 pastedimage1608226640107v1.png

Please do let me know.

Thanks,

Pratiksha

  • Verified answer
    Community Member Profile Picture
    on at
    RE: Update the values stored in optionset for Omnichannel Pre-Chat Survey Question using Javascript/Flow

    Hi Pratiksha,

    Through my test, I find that it is not general option set type field.

    In fact, it is an entity, and each option in the list is each record of Survey Answer Option(msdyn_chatansweroption) entity, which is N:1 relationship between it and survey question (msdyn_surveyquestions) entity.

    For example, I create a survey question record that answer type is ‘option set’ and it has four options.

     pastedimage1608543855719v2.png

    When you direct to the survey question record, the four options is listing in the sub-grid, if you click add button of the sub-grid, it will open Survey Answer Option quick create form.

     pastedimage1608543749255v1.png

    So if you want to add or delete one option in the list with the flow, you need use ‘create new record’ or ‘delete a record’ action that associate with ‘options’ survey question.

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

  • Pratiksha Panchbhai Profile Picture
    on at
    RE: Update the values stored in optionset for Omnichannel Pre-Chat Survey Question using Javascript/Flow

    Leah Ju , Thanks for your response.  The context variable does have all the variables in the environment, But I want to retrieve all the value that is already stored in the variable when we create.

    Like suppose I have a variable x of data type optionset... So there will be predefined values for the optionset to be able to show in the dropdown in chat. Can you help me out with that?

    The entity context item value ,this entity actually stores all the values that we get from customers for the question/variable

  • Community Member Profile Picture
    on at
    RE: Update the values stored in optionset for Omnichannel Pre-Chat Survey Question using Javascript/Flow

    Hi Pratiksha,

    For the Pre-chat survey:

    you can try to retrieve context variable(msdyn_ocliveworkstreamcontextvariable) and context item value(msdyn_ocliveworkitemcontextitem) entities.

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 51 Most Valuable Professional

#2
Ramesh Kumar Profile Picture

Ramesh Kumar 42

#3
David Shaw_UK Profile Picture

David Shaw_UK 27

Featured topics

Product updates

Dynamics 365 release plans