Filter By Analyst on Activity Implementer
{ DataType: "UserPicker", PropertyDisplayName: "ActivityImplementer", PropertyName: "AssignedWorkItem", FilterByAnalyst: true },
Does anyone know the proper syntax?
Best Answers
-
john_doyle Cireson Support Ninja IT Monkey ✭✭✭✭Here's a way to set the FilterByAnalyst setting on the Activity Implementer on Manual Activity forms for Service and Change Requests. Add this code to your custom.js file.
<div>/* Add the FilterByAnalyst setting to the Activity Implementer dropdown control */<br>app.custom.formTasks.add('ServiceRequest', null, function (formObj, viewModel) {<br> pageForm.boundReady(function () {<br> $(document).on("ajaxStop","",setFilterByAnalyst);<br> });<br>});</div><div><br>app.custom.formTasks.add('ChangeRequest', null, function (formObj, viewModel) {<br> pageForm.boundReady(function () { <br> $(document).on("ajaxStop","",setFilterByAnalyst);<br> });<br>}); </div><div>function setFilterByAnalyst () {<br> var userPicker = $("input[data-control-bind='AssignedWorkItem'][data-control-itemtype='ManualActivity']"); <br> if (userPicker.length > 0) { <br> userPicker.each(function(index,picker) {<br> $(picker).data("kendoAutoComplete").dataSource.options.transport.read.data.filterByAnalyst = true;<br> });<br> $(document).off("ajaxStop","",setFilterByAnalyst);<br> }<br>};<br></div>
9 -
Michael_Costello Customer Adept IT Monkey ✭✭
// Add the FilterByAnalyst setting to the Activity Implementer dropdown control
app.custom.formTasks.add('ServiceRequest', null, function (formObj, viewModel) {
pageForm.boundReady(function () {
$(document).on("ajaxStop","",setFilterByAnalyst);
});
});
app.custom.formTasks.add('ChangeRequest', null, function (formObj, viewModel) {
pageForm.boundReady(function () {
$(document).on("ajaxStop","",setFilterByAnalyst);
});
});
function setFilterByAnalyst () {
var userPicker = $("input[data-control-bind='AssignedWorkItem'][data-control-itemtype='ManualActivity']");
if (userPicker.length > 0) {
userPicker.each(function(index,picker) {
$(picker).data("kendoAutoComplete").dataSource.options.transport.read.data.filterByAnalyst = true;
});
$(document).off("ajaxStop","",setFilterByAnalyst);
}
};
1
Answers
@john_doyle - can you repost this solution ? The code in the accepted answer is just a comment line.
@Jerry_Veldhuis
// Add the FilterByAnalyst setting to the Activity Implementer dropdown control
app.custom.formTasks.add('ServiceRequest', null, function (formObj, viewModel) {
pageForm.boundReady(function () {
$(document).on("ajaxStop","",setFilterByAnalyst);
});
});
app.custom.formTasks.add('ChangeRequest', null, function (formObj, viewModel) {
pageForm.boundReady(function () {
$(document).on("ajaxStop","",setFilterByAnalyst);
});
});
function setFilterByAnalyst () {
var userPicker = $("input[data-control-bind='AssignedWorkItem'][data-control-itemtype='ManualActivity']");
if (userPicker.length > 0) {
userPicker.each(function(index,picker) {
$(picker).data("kendoAutoComplete").dataSource.options.transport.read.data.filterByAnalyst = true;
});
$(document).off("ajaxStop","",setFilterByAnalyst);
}
};