{Quick tip} Get two option set value in Dynamics Portal

Came to give quick tip on Dynamics 365 / CRM Two option set field in Dynamics Portal.

Previous post I showed on how to set value for option set field (Two option set)

Here you go for get the value from two option set.

In 2017, this piece of line worked $(‘input[name*=new_contactupdated]:checked’).val()

In 2020, Above line yields undefined error. @Leo, Thanks for the comment. Below code snippet works fine  $('#new_contactupdated').is(":checked")

Hope it help you to reduce your time on searching this.

Please do share your thoughts on my posts to improve the content.

If you need anything on the Dynamics 365 and it’s related stuffs, please don’t hesitate to reach me.

2 thoughts on “{Quick tip} Get two option set value in Dynamics Portal

  1. Hi,

    Thank you for sharing this. I tried with this syntax but it gives undefined error message.

    Could you please correct me if I have given the right one.

    var twoOptionSet = $(‘input[name*=new_schemaname]:checked’).val();

    Regards,
    Leo

    1. Hi Leo,

      Thanks for the comment. Below snippet will work for you. Please do share your feedback on this.

      var twoOptionSet = $(‘#new_schemaname’).is(“:checked”);

      Regards,
      Maniraj.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.