Hello Everyone.
I am facing an issue in displaying a data in a drop-down based on selection from an
option set.
I have a Sample as a Custom Entity.
In Sample Entity there is a field name is Cars which have multiple cars in an option set data type.
As I select Cars from options set it should display in a drop-down.
The code is displayed below:-
<html>
<head>
<title> MultiSelection Demo </title>
</head>
<body>
<select multiple id="selectForm">
</select>
</body>
</html>
<script>
var attribute = window.parent.Xrm.Page.getAttribute('smp_optionset');
var optiontable = attribute.getOptions();
var dropdown = document.getElementById("selectForm");
for(var i=0; i<optiontable.length; i++)
{
var text = optiontable[i].text;
var value = optiontable[i].value;
var option = document.createElement("option");
option.text = Text;
option.value = Value;
dropdown.add(option);
alert("Text = " + text + "Value = " + value );
</script>
*This post is locked for comments
I have the same question (0)