New portal affected user page - customizing the template dropdownlist
One thing is blocking me before making that page visible to my analysts. By default the dropdown is showing all my incident templates. I want to filter the list to exclude my workflow en ARO templates.
I think there might be a possibility to build some custom code in custom.js to achieve that, but I don't know how.
Inside this script source I found some code building up the list of IR templates: \Scripts\viewPanels\affectedUser\app\ircontroller.js
I want to filter the tList object, by making a customization inside custom.js.
Thanks for any help.
Kind regards,
Frederik
Answers
If I want to filter the template combobox on the new affectedUser page, I experience some difficulties.
1) The combobox <select> and its <option> elements are not having an ID or good classname to use in document.querySelector().
2) If I use the code from the post and want to change the target to the combobox with templates, then I use this code in custom.js inside document ready:
$(document).ready(function() {
});
But my problem is that the viewpanel with the affectedUser form is not yet loaded, so my var dropdownTarget is null. The affected user app is working different to the drawer. The drawer is already loaded, but a viewpanel not.
How can I solve this?