script for pre-check "Add message to action log" checkbox in send mail feature
Hi Folks
Is there any possibility to precheck the "Add message to action log" in send mail Feature?
I've already tried it with adding some selfmade script in the footer script loader:
<script>
document.getElementById("IsAddToLog").checked = true;
</script>
Unfortunately I'm not very good in scripting, so it didn't work
Because this checkbox is at the very bottom of the form, a lot of our analysts miss it, what not even should be possible.
It should be pre-selected all the time.
Can you help me with this?
Best Answer
-
Tom_Hyde Customer Advanced IT Monkey ✭✭✭Hi @Silas_Sulser
Add the below to your custom.js
app.custom.formTasks.add('Incident', null, function (formObj, viewModel) {
//bind a function to the form ready event
formObj.boundReady(function () {
$(".link[data-bind*=sendEmail]").on("click", function () {
$("#IsAddToLog").trigger("click").closest("div");
});
});
});
app.custom.formTasks.add('ChangeRequest', null, function (formObj, viewModel) {
//bind a function to the form ready event
formObj.boundReady(function () {
$(".link[data-bind*=sendEmail]").on("click", function () {
$("#IsAddToLog").trigger("click").closest("div");
});
});
});
app.custom.formTasks.add('ServiceRequest', null, function (formObj, viewModel) {
//bind a function to the form ready event
formObj.boundReady(function () {
$(".link[data-bind*=sendEmail]").on("click", function () {
$("#IsAddToLog").trigger("click").closest("div");
});
});
});
3
Answers
Add the below to your custom.js
app.custom.formTasks.add('Incident', null, function (formObj, viewModel) {
//bind a function to the form ready event
formObj.boundReady(function () {
$(".link[data-bind*=sendEmail]").on("click", function () {
$("#IsAddToLog").trigger("click").closest("div");
});
});
});
app.custom.formTasks.add('ChangeRequest', null, function (formObj, viewModel) {
//bind a function to the form ready event
formObj.boundReady(function () {
$(".link[data-bind*=sendEmail]").on("click", function () {
$("#IsAddToLog").trigger("click").closest("div");
});
});
});
app.custom.formTasks.add('ServiceRequest', null, function (formObj, viewModel) {
//bind a function to the form ready event
formObj.boundReady(function () {
$(".link[data-bind*=sendEmail]").on("click", function () {
$("#IsAddToLog").trigger("click").closest("div");
});
});
});
Hi all,
I'd previously tested this on version 7.4 and am now using 8.4.3.2012 and this no longer works. Has anyone had any success?
Thanks
We have it working in 8.6 but the newest portal version have this functionality included and you can set the feature in admin settings https://support.cireson.com/KnowledgeBase/View/1168#/