How to prevent parent list value selection in AssignToAnalystByGroupWindow?
I'd like to mimc the "LeafNodeOnly:true" capability of the JS templates, but for the HTML form used by AssignToAnalystByGroupWindow. My service desk organizes tier queues (support groups) by organization, and does not want the parent value selectable.
Note: we have disabled the Support Group field on the form due to it having no relationship to Assigned To user - we use the assign to analyst by support group task.
Answers
I'm using this to set the attribute: $('div[data-role="TierQueue"]').attr("data-mustselectleafnode", true);
But, am not seeing the same effect as when this attribute is set for a field on the form (parent values grayed out)
You will need to create a custom task and bind the combobox selection option to a function that only opens parent nodes and does not fire a select event.
I created a custom HTML form and custom task to launch the form. Support Group functions perfectly. However, I am unable to bind the support group members to my custom Assigned To combo box. Here is the function I call each time support group field changes:
supportgroupChange: function(e) {
if (vm.FullClassName == "Incident"){
var supportgroupid = this.TierQueue.Id;
} else if (vm.FullClassName == "ServiceRequest"){
var supportgroupid = this.ServiceRequest.Id;
}
var enumid = supportgroupid;
$.ajax({
url: "/api/V3/User/GetSupportGroupUsers",
type: "GET",
contentType: "application/json; charset=utf-8",
dataType: "json",
data: { id: enumid },
success: function (data) {
$("div[id='custom_assignedToCombo']").each( function() {
//Bind to the Combobox and add new datasource
var combobox = $(this).data("kendoComboBox");
combobox.bind("open", function(){
this.setDataSource(data);
});
})
}
});
},
And hopefully, this code might help you with binding members of the chosen support group to the assignee field: https://community.cireson.com/discussion/comment/6378/#
Tom, your solution is fantastic and almost 100% what I need.
The only piece left for me to solve (and abandon my usage of a custom form) is to add the ability for Assigned To to function as a dropdown list containing the support group members.