Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Display a by retrieving option set in a web resource

$
0
0

Hi,

I'm new on Dynamics 365, and I still don't succeed in retrieving my option set text/values.

I would like display the options by using a web resource searching in an option set the options available. 

But after some work, I still don't succeed. 

<html><body>

<select multiple id="selectForm">
</select>
</body></html>

<script>
var attribute = Xrm.Page.getAttribute('new_optionset_prenom'); var optiontable = attribute.getOptions(); var i = 0; for (i in optiontable)
{ document.getElementById("selectForm").options[document.getElementById("selectForm").options.length] =
new Option(optiontable[i], i);

}
</script>

I imagined that optiontable was a table of object for every option, but I don't succeed in manipulate it.

In the end I would like to get an exemple like that : 

because my option set has some name inside.

thank you for your help !

regards


Viewing all articles
Browse latest Browse all 79901

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>