// Insert button if case is Open
function showCloseButton() {
jQuery("input[id$='_diidIOSaveItem']").before("<input type='button' id='CloseTicket' class='ms-ButtonHeightWidth' style='margin-right:4px;' value='Close this case' onclick='closeTicket()' />");
}
function closeTicket(){
setFieldValue("Status","Closed");
setFieldValue("DUC",false);
var dateVal = new Date();
spjs.utility.setDateFieldFromDateObject("DateCompleted",dateVal,0);
spjs.dffs.triggerSave();
}
Thank you!
This reply was modified 5 years, 7 months ago by Maciek Grischke.