web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Kendo UI List Box With CRM data

(0) ShareShare
ReportReport
Posted on by

Hi Every one,

i am trying to load the CRM Entity list in Kendo List box. but with below code, i am not getting the list.

Can any one suggest how to load the CRM all Entity list kendo list box.

Kendo-ui-list.JPG

<!DOCTYPE html>

<html>
<head>
<base href="demos.telerik.com/.../index">
<style>
html {
font-size: 14px;
font-family: Arial, Helvetica, sans-serif;
}
</style>
<title></title>
<link rel="stylesheet" href="kendo.cdn.telerik.com/.../kendo.common-material.min.css" />
<link rel="stylesheet" href="kendo.cdn.telerik.com/.../kendo.material.min.css" />
<link rel="stylesheet" href="kendo.cdn.telerik.com/.../kendo.material.mobile.min.css" />

<script src="kendo.cdn.telerik.com/.../jquery.min.js"></script>
<script src="kendo.cdn.telerik.com/.../kendo.all.min.js"></script>


</head>
<body>

<div>
<table>
<tr>
<td class="auto-style1">Click to Load CRM Entities</td>
<td class="auto-style4">
<button type="button" ID="btnLoadInstance">Load Entities</button>

</td>
</tr>
</table>
</div>

<div id="example" role="application">
<div class="demo-section k-content">
<div>
<label for="optional" id="employees">Entities</label>
<label for="selected">Developers</label>
<br />
<select id="optional">

</select>
<select id="selected"></select>
</div>
</div>
<script>
$(document).ready(function () {

var Query = "EntityDefinitions?$select=DisplayName";
//var req = new XMLHttpRequest();
//req.open("GET", serverURL + "/api/data/v8.2/" + Query, true);

var serverURL = "CRM URL"
var dataSource = new kendo.data.DataSource({
serverFiltering: true, // <-- Do filtering server-side
serverPaging: true,
type: "odata",
transport: {
read: {
url: serverURL + "/api/data/v8.2/" + Query,
dataType: "json"
},
parameterMap: function (options, type) {
var paramMap = kendo.data.transports.odata.parameterMap(options);

delete paramMap.$inlinecount; // <-- remove inlinecount parameter.
delete paramMap.$format; // <-- remove format parameter.

return paramMap;
}
},
schema: {
data: function (data) {
return data; // <-- The result is just the data, it doesn't need to be unpacked.
},
total: function (data) {
return data.length; // <-- The total items count is the data length, there is no .Count to unpack.

}

}
});
$("#optional").kendoListBox({
dataSource: dataSource,
dataTextField: "Label",
connectWith: "selected",
toolbar: {
tools: ["moveUp", "moveDown", "transferTo", "transferFrom", "transferAllTo", "transferAllFrom", "remove"]
}
});

$("#selected").kendoListBox();
});
</script>
</div>

<style>
.demo-section label {
margin-bottom: 5px;
font-weight: bold;
display: inline-block;
}

#employees {
width: 270px;
}

#example .demo-section {
max-width: none;
width: 515px;
}

#example .k-listbox {
width: 236px;
height: 310px;
}

#example .k-listbox:first-of-type {
width: 270px;
margin-right: 1px;
}
</style>


</body>
</html>

<!DOCTYPE html>
<html>
<head>
<base href="demos.telerik.com/.../index">
<style>
html {
font-size: 14px;
font-family: Arial, Helvetica, sans-serif;
}
</style>
<title></title>
<link rel="stylesheet" href="kendo.cdn.telerik.com/.../kendo.common-material.min.css" />
<link rel="stylesheet" href="kendo.cdn.telerik.com/.../kendo.material.min.css" />
<link rel="stylesheet" href="kendo.cdn.telerik.com/.../kendo.material.mobile.min.css" />

<script src="kendo.cdn.telerik.com/.../jquery.min.js"></script>
<script src="kendo.cdn.telerik.com/.../kendo.all.min.js"></script>


</head>
<body>

<div style="align-items: center">
<h1 style="align-items: center">Portal for Data Obfuscation</h1>
</div>
<div>
<table>
<tr>
<td class="auto-style1">Click to Load CRM Entities</td>
<td class="auto-style4">
<button type="button" ID="btnLoadInstance">Load Entities</button>

</td>
</tr>
</table>
</div>

<div id="example" role="application">
<div class="demo-section k-content">
<div>
<label for="optional" id="employees">Entities</label>
<label for="selected">Developers</label>
<br />
<select id="optional">

</select>
<select id="selected"></select>
</div>
</div>
<script>
$(document).ready(function () {

var Query = "EntityDefinitions?$select=DisplayName";
//var req = new XMLHttpRequest();
//req.open("GET", serverURL + "/api/data/v8.2/" + Query, true);

var serverURL = "CRM URL";
var dataSource = new kendo.data.DataSource({
serverFiltering: true,
serverPaging: true,
type: "odata",
transport: {
read: {
url: serverURL + "/api/data/v8.2/" + Query,
dataType: "json"
},
parameterMap: function (options, type) {
var paramMap = kendo.data.transports.odata.parameterMap(options);

delete paramMap.$inlinecount; // <-- remove inlinecount parameter.
delete paramMap.$format; // <-- remove format parameter.

return paramMap;
}
},
schema: {
data: function (data) {
return data; // 
},
total: function (data) {
return data.length; //

}

}
});
$("#optional").kendoListBox({
dataSource: dataSource,
dataTextField: "Label",
connectWith: "selected",
toolbar: {
tools: ["moveUp", "moveDown", "transferTo", "transferFrom", "transferAllTo", "transferAllFrom", "remove"]
}
});

$("#selected").kendoListBox();
});
</script>
</div>

<style>
.demo-section label {
margin-bottom: 5px;
font-weight: bold;
display: inline-block;
}

#employees {
width: 270px;
}

#example .demo-section {
max-width: none;
width: 515px;
}

#example .k-listbox {
width: 236px;
height: 310px;
}

#example .k-listbox:first-of-type {
width: 270px;
margin-right: 1px;
}
</style>


</body>
</html>

*This post is locked for comments

I have the same question (0)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans