Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 30534

Auto-check items on SD form

$
0
0

In my environment with the way we use Service Desk, we will never have a time when we will not check the Billable and Show On Invoice checkboxes on a ticket note.  (Please don't argue about this, it's just the way it is.  Let's just move on...).  The problem lies with each tech sometimes forgetting to check those each time they make a note on a ticket.  The solution was to find a way to have those two boxes automatically checked every time the notes tab was opened.  I've spent the better part of a week trying to figure this out, from looking in the form XML, to the XML schema, to the back-end code (which isn't provided to us... stupid compiled DLLs), to the database tables.  It seems that Kaseya went to great lengths to make the function of their tool unchangeable.  I even tried some hacking techniques to hook the JSON that gets passed back and forth to create the popup tickets.

My first attempt was a SQL trigger to automatically change any note where the tech forgot to check the billable box to make it look like he did check it:

USE [ksubscribers]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [kasadmin].[billableToY]
 ON [kasadmin].[SDIncidentActivity]
 AFTER INSERT
AS
BEGIN
 SET NOCOUNT ON;

 UPDATE a
 SET a.billable = 'Y'
 FROM inserted i
 INNER JOIN kasadmin.SDIncidentActivity a on i.id = a.id
 WHERE i.editingPartnerUserFK is not null and
  i.billable = 'N' and
  i.sdNote not like 'Auto Generated Note%'
END

It is of note that this trigger doesn't actually "check" the checkbox, it only changes the database field to make it look like the checkbox was checked.  Though after looking through the database for some way to auto-check the "Show on Invoice" checkbox, I found a ton of KSB.* tables that had many tables/fields relating to "billable" and "invoice".  This leads me to believe that there is some back-end code that does much more than set a field to Y or N if either of those two checkboxes are checked.  It is creating rows and setting fields in many tables behind the scenes.

So after that long diatribe, here is my question...  Does anyone know how to make checkboxes on a Service Desk form automatically checked?  I don't care if it's a hack or the "right" way of doing it.  I just need them checked as soon as the ticket is opened so that all of the back-end stuff happens when the tech saves the ticket.


Viewing all articles
Browse latest Browse all 30534

Trending Articles