Video Screencast Help
Scheduled Maintenance: Symantec Connect is scheduled to be down Saturday, April 19 from 10am to 2pm Pacific Standard Time (GMT: 5pm to 9pm) for server migration and upgrades.
Please accept our apologies in advance for any inconvenience this might cause.

How we Customized our Helpdesk

Created: 29 Aug 2007 • Updated: 04 Sep 2007 | 27 comments
Language Translations
razell's picture
+2 2 Votes
Login to vote

Wow, helpdesk user (and Juice reader) razell spent some quality time putting some really nice touches on his company's helpdesk... and he's sharing his secrets!

Read on to learn what (and how) he did to make his helpdesk fit juuuuust right.

This is a full process to make a customization with:

  • add scalar field
  • add lookup field
  • custom config & aspx
  • customization in view/edit mode of the worker page with the news fields
  • etc.

1. Add a scalar field

  • Run SQL server
  • Select Altiris database Incident
  • Run this sql :
    ALTER TABLE workitem ADD Demonstration nvarchar(128) NOT NULL DEFAULT
    (N'')
    EXEC sp_addviewdef N'workitem_only_view', N'workitem.demonstration
    AS workitem_demonstration', N''
    EXEC sp_createHDDview 'workitem_only_view', 'workitem'
    EXEC sp_createHDDview 'workitem_detail_view', 'workitem_only_view'
    if exists (select * from sysobjects where id =object_id(N'[dbo].[workitem_current_view]') and OBJECTPROPERTY(id,N'IsView') = 1)drop view [dbo].[workitem_current_view]

    (Replace all the "demonstration" by the name of you field)

  • Run this sql :
    CREATE VIEW dbo.workitem_current_view AS SELECT workitem_detail_view.* FROM workitem_detail_view WHERE (workitem_is_last = N'1')
  • Close your SQL server Management

2. Add a Lookup field

  • Run SQL server
  • Select Altiris database Incident
  • Run this SQL :
    if not exists (select * from sysobjects where id =object_id(N'[dbo].[workitem_customlookup_lookup]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    begin
    CREATE TABLE [dbo].[workitem_customlookup_lookup] ([id] [int] NOT NULL PRIMARY KEY,[status] [nchar] (1) NOT NULL DEFAULT (N'a'),[value] [nvarchar] (255) NOT NULL DEFAULT (N''),[ordinal] [int] NOT NULL DEFAULT (0),[is_default] [nchar] (1) NOT NULL DEFAULT (N'0')) ON [PRIMARY] end
    insert into workitem_customlookup_lookup(id,status,value,ordinal,is_default) values(100,'a','field1',1,'1')
    insert into workitem_customlookup_lookup(id,status,value,ordinal,is_default) values(200,'a','filed2',2,'0')
    insert into workitem_customlookup_lookup(id,status,value,ordinal,is_default) values(300,'a','field3',3,'0')
    declare @id int
    set nocount on
    set @id = object_id(N'[dbo].[workitem]')
    if not exists( select * from syscolumns where name='customlookup_lookup_id' and id=@id)
    begin
    ALTER TABLE workitem ADD customlookup_lookup_id int NOT NULL CONSTRAINT [DF_workitem_customlookup_lookup_id] DEFAULT (0) WITH VALUES
    CREATE INDEX [IX_customlookup_lookup_id] ON [dbo].[workitem]([customlookup_lookup_id]) ON [PRIMARY] end
    exec sp_addviewdef N'workitem_only_view',N'workitem.customlookup_lookup_id AS workitem_customlookup_lookup_id', N''
    exec sp_addviewdef N'workitem_detail_view', N'wal.value AS workitem_customlookup_lookup_value', N'LEFT OUTER JOIN workitem_customlookup_lookup wal ON workitem_customlookup_lookup_id= wal.id'
    exec sp_addviewdef N'workitem_detail_view', N'wal.ordinal AS workitem_customlookup_lookup_ordinal', N''
    exec sp_createHDDview 'workitem_only_view', 'workitem'
    exec sp_createHDDview 'workitem_detail_view', 'workitem_only_view'
    if exists (select * from sysobjects where id =object_id(N'[dbo].[workitem_current_view]') and OBJECTPROPERTY(id,N'IsView') = 1)
    drop view [dbo].[workitem_current_view]
    
  • Now run this sql :
    CREATE VIEW dbo.workitem_current_view AS SELECT workitem_detail_view.* FROM workitem_detail_view WHERE (workitem_is_last = N'1')
  • Finaly, Run this sql :
    insert into query (name, expression, cache_results)
    values (N'customlookupList', N'SELECT * FROM workitem_customlookup_lookup where
    lower(status)=N''a'' order by ordinal', N'1')
    
  • In your altiris helpdesk database table, right click on "dbo.lookup_info" and select "open table"

    Add a line like this example

    Lookup_info_id Number x
    Lookup_info_guid (nothing : automatically generated)
    Lookup_info_display_name customlookup
    Lookup_info_value_source workitem_customlookup_lookup
    Lookup_info_table_name workitem
    Lookup_info_field_name customlookup_lookup_id
    Lookup_info_view_format workitem_customlookup_lookup_{0}
    Lookup_info_status a
    Lookup_info_is_ordered 1
  • Close your SQL server Management
  • Open your altiris helpdesk
  • Go to Admin tabs and select "lookup" and control that your new lookup field is well created

    Now modify and create the display value as you wished

3. Create a worker custom page

  • Open "Windows explorer"
  • Go to "…\Altiris\Helpdesk\AeXHD\worker" directory
  • Create a custom.config like this
    <?xml version="1.0" encoding="utf-8" ?>
    <custom.configuration>
    <files path="~/custom/templates/">
        <file id="WorkItemEdit" file="customWorkItemEdit.ascx"/>
        <file id="WorkItemView" file="customWorkItemView.ascx"/>
        <file id="subWorkItemEditGeneral" file="customsubWorkItemEditGeneral.ascx"/> 
        <file id="subWorkItemEditAsset" file="customsubWorkItemEditAsset.ascx"/> 
        <file id="subWorkItemEditAttach" file="customsubWorkItemEditAttach.ascx"/> 
        <file id="subWorkItemEditBulletin" file="CustomsubWorkItemEditBulletin.ascx"/> 
        <file id="subWorkItemContact" file="customsubWorkItemEditContact.ascx"/> 
        <file id="subWorkItemEditEmail" file="customsubWorkItemEditEmail.ascx"/> 
        <file id="subWorkItemEditFindAsset" file="customsubWorkItemEditFindAsset.ascx"/>
        <file id="subWorkItemEditFindContact" file="customsubWorkItemEditFindContact.ascx"/> 
        <file id="subWorkItemEditLink" file="customsubWorkItemEditLink.ascx"/>
      </files>
    </custom.configuration>
    
    
  • Create a default.aspx like this
    <%@ Page SmartNavigation="false" Language="vb" Inherits="Altiris.Helpdesk.Web.HelpdeskConsole" %>
    <%@ Register TagPrefix="aw" Namespace="Altiris.AppWeaver" Assembly="Altiris.AppWeaver" %>
    <script language="VB" runat="server">
      Public Overrides ReadOnly Property PresentationHolder() As PresentationHolder
        Get
          Return phPresentation
        End Get
      End Property
    
      Protected Overrides Sub OnInit(ByVal e As EventArgs)
        Me.ID = "conWorker"
        MyBase.OnInit(e)
      End Sub
    </script>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
      <HEAD>
        <meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR">
        <meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
        <meta content="JavaScript" name="vs_defaultClientScript">
        <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
        <% WriteHeadRecords() %>
      </HEAD>
      <body <% WriteBodyAttributes() %>>
      <form id="consoleForm" runat="server">
        <aw:PresentationHolder ID="phPresentation" Runat="server"></aw:PresentationHolder>
      </form>
      </body>
    </HTML>
    
    
  • Create a custom directory in "…\Altiris\Helpdesk\AeXHD\"
  • Create a templates directory in "…\Altiris\Helpdesk\AeXHD\custom\"
  • Copy these files from "…\Altiris\Helpdesk\AeXHD\templates" in "…\Altiris\Helpdesk\AeXHD\custom\templates"

    -------------------------------------------------------
    o WorkItemEdit.ascx
    o WorkItemView.ascx Mandatory
    o subWorkItemEditGeneral.ascx
    -------------------------------------------------------
    o subWorkItemEditAsset.ascx
    o subWorkItemEditAttach.ascx
    o subWorkItemEditBulletin.ascx
    o subWorkItemEditContact.ascx
    o subWorkItemEditEmail.ascx
    o subWorkItemEditFindAsset.ascx
    o subWorkItemEditFindContact.ascx
    o subWorkItemEditLink.ascx
    o dashboard.aspx
    -------------------------------------------------------
    And rename the like this :
    o custom.WorkItemEdit.ascx
    o custom.WorkItemView.ascx
    o customsubWorkItemEditGeneral.ascx
    o …

  • Modify the worker page in view mode
    • Open your "customworkitemview.ascx"
    • Find the line with "lblImpact"
    • Paste this to the next line:
      <aw:TextBox id="tbdemonstration" runat="server" Width="155px" ItemDataField="workitem_demonstration" ColSpan="4" Label="custom field1:" ></aw:TextBox>
      <aw:DropDownList id="ddlcustomlookup" runat="server" Width="100%" ItemDataField="workitem_customlookup_lookup_id" Label="custom field 2:" DataTextField="value" DataValueField="id" DataSourceName="test" currentValue="True" ></aw:DropDownList>
      
  • Modify the worker page in edit mode
    • Open your "customWorkItemEdit.ascx"
    • Find the line with "DataStore("DeleteAttachments") = New ArrayList"
    • Paste the following lines to the next line :

      DataStore("customlookups") = New listDataSet ("customlookupList")

    • Open your "customsubWorkItemEditGeneral.ascx"
    • Find the line with "tddlCategory"
    • Paste this following lines :
      <aw:TextBox id="tbdemonstration" runat="server" Width="155px" ItemDataField="workitem_demonstration" ColSpan="4" Label="custom field1:" ></aw:TextBox>
      <aw:DropDownList id="ddlcustomlookup" runat="server" ItemDataField="workitem_customlookup_lookup_id" Label="custom field 2:" DataTextField="value" DataValueField="id" DataSourceName="customlookups" currentValue="True"></aw:DropDownList>

4. Results

View Mode

Click to view.

Edit Mode

Comments 27 CommentsJump to latest comment

bdcock's picture

Just tested on uor test altiris.
Works great, thanhs, finally someone that will share his custom helpdesk knowledge.
Is there a possibility to add the same thing in the winuserpage?
I want that the user who creates the ticket can add his costcenter in that textbox or choosse one from the dropdownmenu.

0
Login to vote
xmoreland's picture

I'm very excited to give this a try. The more ability to do exactly what we need with Helpdesk the better!

Thanks!

0
Login to vote
bdcock's picture

I tried it for the winuser page.
All I see is the first (default) value in the dropdown menu. All the rest is gone. In the worker page this works fine. What do I do wrong?

Solved:
Insert :

DataStore("customlookups") = New listDataSet ("customlookupList") in the winuser page

0
Login to vote
David_Falcon's picture

While the solution probably works, it's a little bit of overkill. You do not have to create a new default.aspx file for modifying the worker console. Second, it looks like the custom.config is missing some information. For instance, there are no defined strings, and I did not see a resource library in the absence of the defined strings.

There are also a ton of file mappings in the custom.config -- what modifications were made these templates? If no modifications were made to them, these are not needed.

If you are only modifying the templates, you could accomplish what you need by adding just the workitemedit and workitemview templates to the custom.config in the root of aexhd. By design, appweaver will only look at these two mappings and will assume all of the other mappings are still good.

0
Login to vote
razell's picture

hello david

I am agree with you but this purpose is only here to make a full example and i don't understand why expert don't give a full example/idea...

The only things that i could see in all the forum is question/answer...

It's not against you but for me, a forum is here to give :
- idea
- answers
- example

Why nobody give a complete custom file for example ? lot of us have a custom file but nobody give it... why ?

0
Login to vote
tracy.mcgee's picture

I couldn't get this to work until I copied the TemplateEngine.inc file into my custom templates folder. Did I miss where this was written to do when creating that folder? Or does it have to be done?

0
Login to vote
Ed_Garza's picture

I have added three custom scalar fields.

The only problem is that the incident history does not track changes to these three fields.

If I change one or all and save, the history will state "incident was saved but no changes were detected."

It would be nice to have the changes to the custom scalar fields tracked in incident history also.

0
Login to vote
tracy.mcgee's picture

I have a CustomStrings.xml file that I added to a page, using the CustomConfig.xml file to call it with this line:

<resourceLibs>
     <resourceLib file="CustomStrings.xml" path="~/custom/" appcache="yes"/>
</resourceLibs>

In that CustomStrings.xml file I added the following:
<string id="WorkItemAutoGenIncludeList">workitem_title, workitem_category_tree_value, workitem_category_type_value, owned_by_worker_name, assigned_to_worker_name, workitem_priority_lookup_value, workitem_status_lookup_value, workitem_type_lookup_value, workitem_is_scheduled, workitem_start_on, workitem_due_on, workitem_external_reference, workitem_link_parent_number, contact_name, managed_object_name,workitem_bulletin_status, workitem_urgency_lookup_value, workitem_impact_lookup_value, workitem_close_code_lookup_value,workitem_link_type_lookup_value,workitem_rating, workitem_MYADDITION, workitem_MYADDITION</string>

where I added the last couple items with the name of the fields that I created. This worked for me. I started seeing the changes tracked in the history. If that is what you were asking. Thanks to the Altiris Engineer that helped me.

0
Login to vote
indigo196's picture

I used these instructions as a base for adding a building field that was a drop down on the edit form and a label on the view form.

Thanks,

0
Login to vote
DeborahKahmke's picture

So, I applied both of these, and they work, but what if I want to remove the scalar field. I removed the Demonstration column from the workitem field (using the ALTER TABLE workitem DROP COLUMN Demonstration SQL command) however, this does not drop anything from the views and returns errors in the interface regarding the workitem_current_view View.

Any help would be appreciated!

-d

Deborah Kahmke

0
Login to vote
Shepherd.Wesley's picture

Hello,

I have done this about 3 times and each time after i restart IIS i go into the helpdesk conole and the main worker summary opens up. When i go to start a new ticket i get an error

errErrorLoadingUserControl("/AeXHD/custom/templates/customsubWork...")

Has anyone gotten this and knows how to fix it? I dont know which customsubwork its refering too but I assume its refering to the one in the document. i have started completely over and still no luck. Any ideas?

Thanks
Wes

0
Login to vote
David_Falcon's picture

I don't have a console in front of me so I'm going off memory. There is a file called templateEngine.inc or something like that in the templates folder. Did you copy that file and place a copy in your custom folder? If not, try it and see if it works...you don't have to restart iis for this.

0
Login to vote
Shepherd.Wesley's picture

That did work for me just fine!!!

0
Login to vote
dabomb311's picture

This guide is very useful. Thanks. I however cannot find some of these files. they are:

o subWorkItemEditGeneral.ascx
o subWorkItemEditAsset.ascx
o subWorkItemEditAttach.ascx
o subWorkItemEditBulletin.ascx
o subWorkItemEditContact.ascx
o subWorkItemEditEmail.ascx
o subWorkItemEditFindAsset.ascx
o subWorkItemEditFindContact.ascx
o subWorkItemEditLink.ascx

i do however have subWorkerItemTable.acsx & subWorkerItemFind.acsx

also, i cannot find the templateEngine.inc file..

any ideas??

0
Login to vote
Dominique's picture

If you are on Helpdesk Solution SP 5 6.0.308
All these files are by default in the folder <>\Helpdesk\AexHD\Templates.
They all should be copied in any customized folder especially TemplateEngine.inc all together even if you use only one of them by precaution.

Dom

Dom

0
Login to vote
dabomb311's picture

We are on version 6.0.248. We do not have the software maintenance currently. Is there any other way to get these files??

0
Login to vote
dabomb311's picture

I got files from the updated version, now I am having a problem with the SQL.. I ran the first SQL and replaced customlookup with sitecode and this is the error i got:

Msg 4506, Level 16, State 1, Procedure workitem_only_view, Line 1
Column names in each view or function must be unique. Column name 'workitem_sitecode_lookup_id' in view or function 'workitem_only_view' is specified more than once.

Msg 208, Level 16, State 1, Line 44
Invalid object name 'workitem_only_view'.

0
Login to vote
Dominique's picture

Most of these files appeared only when installing Altiris Helpdesk Solution SP5 6.0.308 which has changed the management of the page of the helpdesk
It was a consolidation of a patch applied on SP 4 (6.0.297)
The integration in an earlier version will be hazardous...

The principe was:
Bfore SP5 you had one unique file WorkitemEdit.ascx which has been split in SP5.
So if you would like to do these tasks in an early version at your own risks you would have to locate the XML lines used here in this article and find it in the workitemedit.ascx and modify it the same way... etc...

Dom

Dom

0
Login to vote
dabomb311's picture

I would like to add the history tracking to my newly added field. I read the previous post but i cannot find the customconfig.xms file. I would like to just track the changes to one drop down list in the history. Thanks

0
Login to vote
trenkert's picture

The customconfig.xml file is something you will have to create. It doesn't exist natively in Helpdesk solution. Browse to C:\Program Files\Altiris\HelpDesk\AeXHD\Custom\ and save a notepad document as file type .xml

"They must find it difficult... Those who have taken authority as the truth, rather than truth as the authority."

"They must find it difficult... Those who have taken authority as the truth, rather than truth as the authority."

0
Login to vote
dabomb311's picture

what files was this added to then:

<resourceLibs>
     <resourceLib file="CustomStrings.xml" path="~/custom/" appcache="yes"/>
</resourceLibs>

0
Login to vote
Frank_L's picture

I just found the above article a few days ago and implemented on my altiris. Opening and editing shows the value of the new category I added but when I view the ticket, I see my custom field showing the ID number instead of the value.

ie: Customer: [current] 100 instead of
Customer: Microsoft

here is the ascx command added to customWorkItemView.ascx: "< aw:DropDownList id="ddlcustomlookup" runat="server" ItemDataField="workitem_customlookup_lookup_id" Label="Customer:" DataTextField="value" DataValueField="id" DataSourceName="customlookups" currentValue="True" >"

Does anyone know how I can fix this? Thanks.

edit: Fixed

I needed to use Label instead of dropdownlist.

0
Login to vote
Cesar_echeverria's picture

change workitem_customlookup_lookup_id    ,  workitem_customlookup_lookup_value

DropDownList
<aw:DropDownList id="ddlcustomlookup" runat="server" ItemDataField="workitem_customlookup_lookup_value" Label="Customer:" DataTextField="value" DataValueField="id" DataSourceName="customlookups" currentValue="True" >

Label
<aw:Label id="ddlcustomlookup" runat="server" ItemDataField="workitem_customlookup_lookup_value" Label="Customer:" DataTextField="value" DataValueField="id" DataSourceName="customlookups" currentValue="True" ></aw:Label>

Cesar Echeverria Castillo

Consultant Engineer

InterLAN Ltda, Medellin, Colombia

P.S.: If this works please let the community knows about it.

0
Login to vote
lmanpunk's picture

I had everything working until I tried to add a second custom data lookup field.

I get an error in the SQL Query

The error appears after this step

exec sp_createHDDview 'workitem_detail_view', 'workitem_only_view'

Msg 1011, Level 16, State 1, Line 44

The correlation name 'wal' is specified multiple times in a FROM clause.

****** Edit - I fixed that issue *********

I changed the wal in the script to wal2 and it ran without error

**********************************************************************

The problem I have now is after I added the second custom data source in the CustomWorkItemEdit I get an error when edit or creating a new incident.

Object reference not set to an instance of an object.

Details
Exception - Altiris.Helpdesk.Services.ListException: A SQL error has occurred:Incorrect syntax near 'a'. ---> System.Data.SqlClient.SqlException: Incorrect syntax near 'a'.
   at Altiris.Helpdesk.Services.SqlHelper.Execute(DataSet fillDataSet, String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters, Int32 nRowsToReturn, Int32 nRowsToSkip, Int32 commandTimeout)
   at Altiris.Helpdesk.Services.ListService.GetLimitedList(ListDataSet resultsDataSet, Boolean schemaOnly, String primaryKeyColumnName)
   --- End of inner exception stack trace ---
The originator of the previous log entry was itself an Exception. The last non-Exception occurred at stack index 2: Altiris.Helpdesk.Services.ListService.GetLimitedList

 

0
Login to vote
i2professional@yahoo.com's picture

hats off for this article. . .
please share if you have any other customizations for helpdesk'
 

+2
Login to vote
Kemcinte's picture
Hello awesome Customization, Thank You!

Do you know how I could include these custom fields in the "Find Incidents" Incident search choices / filters?

Thanks
Kevin

0
Login to vote
Kemcinte's picture

I have got the Incident History tracking working, I would like to have the table name displayed in the history any Ideas on how to added that?

<Missing field Name> changed
    From: Zone 7
    To: Zone 1B

Example;

Status changed
    From: Closed
    To: Open

Thank You,
Kevin

0
Login to vote