1

I am trying to load all the available entities in the CRM, using web api and I am able to fetch all the required information.

URL/api/data/v8.0/EntityDefinitions?$select=SchemaName,LogicalName,IsValidForAdvancedFind&$filter=IsValidForAdvancedFind eq true

But, not able to populate the dropdown, on the page load (It is a HTML Page). Please help me how can I achieve that?

var select = document.getElementById("selectEntity"); 
for (var i = 0; i < results.value.length; i++)
{
  var opt = results.value[i];
  var el = document.createElement("option");
  el.textContent = opt["SchemaName"];
  el.value = opt["LogicalName"];
  select.appendChild(el);
}
msanford
  • 11,803
  • 11
  • 66
  • 93
Sai Krishna
  • 197
  • 1
  • 13

1 Answers1

0

You have to change the syntax for dropdown text assignment.

el.text = opt["SchemaName"];