Customizing The Winuser Console (SP5)

Customizing The Winuser Console (SP5)

WooHoo! Looks like Helpdesk pro David Falcon spent his holiday break customizing his company's helpdesk. If you've ever wanted to "tune" the forms in your helpdesk or just add your company logo to its pages, read on to follow David's lead.

Much of the documentation currently published on Helpdesk customizations refers to previous versions of Helpdesk. This documentation will discuss the steps necessary to perform customizations to Altiris Helpdesk SP5.

If you have installed SP5, you will notice that there are some changes to the interface. In this document I will discuss some of the common customizations that can be performed.

The first difference you will probably notice is in the winuser console. On the left hand side, you will find a "common requests" section that was not in previous versions of Helpdesk.

Changing the Page Title

We will start out by changing the My Helpdesk Console title at the top of the page. To do this, we will overwrite the "sidMyHD" string's default value.

Note: There are MANY pre-defined strings within Altiris Helpdesk. John Doyle has taken the time to compile the English library. If you would like to see the out-of-the-box strings, go to http://johndoyle.org/article002.html and read the article. John provides a link where you can download the strings in a single text file.

If you have not created a custom.config file yet, do this before proceeding. Utilizing a custom.config is considered best practice and will protect customizations from being overwritten by product updates. For the purposes of this example, will be creating a custom.config file and place it in the root of the AeXHD folder.

Begin by going to your AeXHD folder.

Next, create a file named custom.config

In it, follow this format and paste this text into it. (Modify the Bay Dynamics Service Desk Console with your desired text.)

<?xml version="1.0" encoding="utf-8"?>
<custom.configuration>

 <strings>
 <string id="sidMyHD">Bay Dynamics Service Desk Console</string>
 </strings>

</custom.configuration>

Save the file and restart IIS. You will now see the customized title.

Adding a Custom Logo

Now, we will add a customized logo into the title section of the console.

This portion is defined in the Banner.ascx file. We will want to make changes the Banner.ascx; however, we DO NOT want to modify the original file. Following Altiris' best practice, create a folder named custom within the AeXHD folder.

Now go into the ..AeXHD\Presentations folder and copy the Banner.ascx file.

Take that file, paste it into your custom folder, rename the file to CustomBanner.ascx, and remove the read-only attribute from the file.

Now within your custom folder, create a folder named "images."

Within the images folder place the graphic of the icon you want to use. I have had best experience with .png files. For the purposes of this document, I will use a gif file.

Now, return to your custom folder and open the CustomBanner.ascx file. Search for Label id="lblTitle" as you see below. Add the image above this line, but using an <img src> tag as seen below.

Save the new CustomBanner.ascx file and exit.

We must now tell Altiris Helpdesk to use this file instead of the original. We will do this in the custom.config.

Now, use the text below as your custom.config. Notice we are adding to the custom.config we created earlier. Save the file and restart IIS.

<?xml version="1.0" encoding="utf-8"?>
<custom.configuration>

 <strings>
 <string id="sidMyHD">Bay Dynamics Service Desk Console</string>
 </strings>
 
 <presentations path="~/custom/">
 <presentation name="Banner" file="CustomBanner.ascx"/>
 </presentations>
 
</custom.configuration>

You will now see the graphic in the title section.

Understanding Requests

Even though this is not considered a console customization, we will look at the common requests and the Employee Requests and explain how they work. Basically, the common requests are tasks. Unlike previous versions of Helpdesk, when you create a task, you have the ability to place the task in the incident so that it can be invoked or you can place it in the service catalog.

First, we will look at the employee requests section. This portion of the service catalog is visible because it contains active tasks. We will add a task to the manager section so that it appears.

To gain an understanding of the out-of-the-box service categories, go to Admin > Service Categories > Manage Service Categories.

You will notice many out of the box categories. I am only referring to this section so that you can gain an understanding of the structure. You can create additional categories if you desire; however, you cannot delete them - you will need to set them to Inactive.

Now, go to Admin > Tasks > List Tasks

Begin by creating a New Task. Below are the values I am specifying in my task.

The name of the task will be displayed as a hyperlink and the comment will be a descriptive listing under the hyperlink. The Service Category dropdown specifies under which category this will appear. We will use Manager Requests for this demo.

The checkbox "Include this task in the Common Service Category" provides the option for this task to appear under the common requests section. We will not check this box for this demonstration.

The "visible to guests" checkbox provides the option for the task to be available to end-users. The rest of the options are the same as the previous way of creating tasks.

Click OK to save the task.

The Manager Requests section is now visible.

Now click on the Manager Requests Link; you will see the task we just created:

Clicking on the task will populate an incident with the data we specified when we created the task.

Before we proceed, we will add a common request so that we can see how it will look. Below I have created a task to order new toner. Notice the checkbox, "Include this task in the Common Service Request Category."

By checking the "Include this task in the Common Service Request Category" checkbox, the task now appears under common requests. Notice the Order New Toner Link below.

Clicking on the link gives you:

Now that we have briefly touched on the service categories, let's dive into the new incident screen.

Modifying the Incident Screen

Below is the out-of-the-box new incident screen. As a brief demo, I will show you how to hide unwanted fields, add a dropdown list, and a scalar field.

Those who have customized previous versions of Helpdesk will see a few major changes at this time. Mainly, instead of using the ConsoleMyHD template for creating a new incident, the new incident portion is now located in ConsoleMyHDEditItem.ascx file.

Begin by making a copy of the ConsoleMyHDEditItem.ascx file and place it in your custom folder. Again, rename it to CustomConsoleMyHDEditItem.ascx and remove the read-only attribute.

Now, go into your custom.config and add the new file mapping. I have included my custom.config below. Notice I have added to the previously created field and have not created a new file.

<?xml version="1.0" encoding="utf-8"?>
<custom.configuration>
 
 <files path="~/custom/">
 <file id="ConsoleMyHDEditItem" file="CustomConsoleMyHDEditItem.ascx"/>
 </files>

 <strings>
 <string id="sidMyHD">Bay Dynamics Service Desk Console</string>
 </strings>
 
 <presentations path="~/custom/">
 <presentation name="Banner" file="CustomBanner.ascx"/>
 </presentations>
 
</custom.configuration>

Once you have modified the custom.config, save it and restart IIS.

Hiding the Priority Field

In our first example, we will hide the priority field. Go into your CustomConsoleMyHDEditItem.ascx file. One thing to keep in mind: there are multiple page views within this template. For example, one page is to edit and incident while another is to view it. Make sure you modify each page view or the page will not be consistent. For this example, search for every instance of priority in the controls and add a visible = "false" tag to it. I always place a comment line above the line I am modifying so that I can easily see what I have modified. Each instance is displayed below:

Save your template file. Your changes should now be visible. (Note: You only need to restart IIS if you are making a change to one of your .config files.)

Adding a Scalar Field

We will now add a scalar field to this winuser console. A scalar field is simply a text box.

In the below example, I am only showing screenshots of the SQL used to create the scalar field. Because of formatting issues with word and pdf files, it is better to type in the queries instead of using copy and paste so you do not run into problems with formatting.

Each query example is taken from the product guide. For the scalar field in this example, we will add "Application."

Step 1

Step 2

Step 3

Step 4

Step 5

Step 6

We are now done with the SQL portion of the scalar field. Before we go to on to the modifying the CustomConsoleMyHDEditItem.ascx, we will specify the application label value in out custom.config file as a string. This will ensure consistency.

Begin by going to out custom.config and adding an entry. I have included the custom.config below - notice the string entry for application.

<?xml version="1.0" encoding="utf-8"?>
<custom.configuration>
 
 <files path="~/custom/">
 <file id="ConsoleMyHDEditItem" file="CustomConsoleMyHDEditItem.ascx"/>
 </files>

 <strings>
 <string id="sidMyHD">Bay Dynamics Service Desk Console</string>
 <string id="sidLblApplication">Application Name: </string>
 </strings>
 
 <presentations path="~/custom/">
 <presentation name="Banner" file="CustomBanner.ascx"/>
 </presentations>
 
</custom.configuration>

Make your modifications and save the custom.config. Since we modified the custom.config, restart IIS.

Adding Controls

We will now add the necessary controls into our ConsoleMyHDEditItem.ascx template file.

Begin by deciding where you want to place the control. I am placing it where the priority field used to be:

Actual text:

<aw:TextBox id="tbApplication" runat="server" ItemDataField="workitem_application" ColSpan="1" Label="sidLblApplication"></aw:TextBox>

The sidLblApplication is the string we defined earlier in our custom.config.

Do not forget to add this field to each page view where you want it to be visible. Since the remaining page views are for existing incidents, I will not make them editable. We will use a label instead of a TextBox to make this happen.

Actual Text:

<aw:Label id="lblApplication" runat="server" ItemDataField="workitem_application" label="sidLblApplication"></aw:Label>

Actual Text:

<aw:Label id="lblApplication2" runat="server" ItemDataField="workitem_application" label="sidLblApplication"></aw:Label>

Note: Controls must have different names - that is why second one has a 2 behind it.

Screenshots of our customizations have been included:

(Blank new incident screen)

(Populated for submission)

View Incident Screen

Edit existing incident screen.

Adding a Lookup Field to the Winuser Console

We will now add a lookup field to the winuser console. For this example, I will add regions. We will begin with the SQL portion, and again, I am not pasting text because of difficulty I have had with pasting into SQL. Screenshots have been posted below. Refer to the product guide for the logic behind the steps taken.

Step 1

Step 2

Step 3

Step 4

Step 5

Step 6

Step 7

The SQL portion is now complete. Instead of listing a long list of lookup values, I only did two. For an easy way to maintain the lookup list without touching SQL, please see another article I wrote on how to do this here:
http://www.symantec.com/community/node/2285

Once again, go into the custom.config and define the region label. I have included my custom.config below:

<?xml version="1.0" encoding="utf-8"?>
<custom.configuration>
 
 <files path="~/custom/">
 <file id="ConsoleMyHDEditItem" file="CustomConsoleMyHDEditItem.ascx"/>
 </files>

 <strings>
 <string id="sidMyHD">Bay Dynamics Service Desk Console</string>
 <string id="sidLblApplication">Application Name: </string>
 <string id="sidLblRegion">Region: </string>
 </strings>
 
 <presentations path="~/custom/">
 <presentation name="Banner" file="CustomBanner.ascx"/>
 </presentations>
 
</custom.configuration>

Once you make this change, save the custom.config and restart IIS.

We are now ready to make the changes to our CustomConsoleMyHDEditItem.ascx file - go ahead and open the file. Since this is a lookup list, we must define a datastore before the lookup list will function properly.

Begin by adding the "Regions" datastore as listed below.

The ListDataSet must match the query we specified in the final SQL step we performed above.

Now that the datastore has been created, we can now add the controls.

I decided to add the region directly before the application.

Actual text:

<aw:DropDownList id="ddlRegion" runat="server" ItemDataField="workitem_region_lookup_id" colspan="1" Label="sidLblRegion" DataTextField="value" DataValueField="id" DataSourceName="Regions" currentValue="False"></aw:DropDownList>

Actual Text:

<aw:Label id="lblRegion" runat="server" ItemDataField="workitem_region_lookup_value" label="sidLblRegion"></aw:Label>

Actual Text:

<aw:DropDownList id="ddlRegion2" runat="server" ItemDataField="workitem_region_lookup_id" colspan="1" Label="sidLblRegion" DataTextField="value" DataValueField="id" DataSourceName="Regions" currentValue="False"></aw:DropDownList>

For the final dropdown list, I had the option of defining it as it a label which would have made the field read-only, or in this case, I left it as a dropdown list type control so that it can be modified.

Below are the various screenshots.

New Incidents

View Incidents

Edit existing incidents (Notice how you can still modify the region)

Conclusion

This concludes this document for customizing the latest winuser console. In my next article, I will try to explore the service catalog in depth and demonstrate some practical examples.

4.037735
Average: 4 (53 votes)

Where do you find the SQL

dfnkt_'s picture

Where do you find the SQL GUI in the first screenshot about adding a scalar field?

EDIT: Found MS SQL EXPRESS Studio

Great article!

question

dfnkt_'s picture

Step 3 image under adding scalar field "iewdef" a typo? I'm getting an error about unable to find process, I tried viewdef, same error and view_def deals with tables.

PDF refers to EXEC sp_addviewdef

Cut off

It looks like it got cut off...it should read:

EXEC sp_addviewdef N'workitem_only_view', N'workitem.application AS workitem_application', N''
GO

Freakin Sweet! Good job

billyccfs's picture

Freakin Sweet! Good job David.

Limiting the Uset seen tickets?

How can I change the query that runs on the Winuser console to exclude Closed tickets?

Janjira answered this one...

You need to add one line to the LoadDataSources subroutine in the winuser console template (ConsoleMyHD.ascx). Remember that it is advisable to first make a custom copy of this template as explained in the Helpdesk documentation.

Anyway, find the line which reads:

DataStore("Contact").BeginEdit

and add this line after it:

DataStore("Contact").AssociatedWorkItems.DefaultView.RowFilter = "workitem_status_lookup_id<>'600'"

How do you show the new data in the Worker incident view?

Thank you for putting these instructions together. I have been able to do quite a bit of customization because of your efforts.

I am having some trouble figuring out how to show the name data in the Worker incident view. I did a dropdownlist but I cannot get that to show. I tried adding it to a custom subWorkItemEditGeneral, but that just throws an error.

RE: How do you show the new data in the Worker incident view?

We were able to show the new data in the Worker view by following the instructions provided by razell (How we Customized our Helpdesk). We followed the instructions under Section 3 except we did not create a new default.aspx page.

Also, you don't need to

Also, you don't need to create a new default.aspx page for your customizations to show up.

You only need to have your custom.config in place, pointing to the appropriate "cloned" templates.

What version of HD are you using?

You need to make sure that

You need to make sure that the TemplateEngine.inc file is located in the same folder as your templates. Can you tell me kind of error you are getting?

Removing the "Search for services containing:" link

mabdelnabi's picture

Thanks for the great post.

Do you know how to remove the "Search for services containing:" from the left pane?

Thanks...

Removing the "Search for services containing:" link

Were you able to find how to remove the Search for Services from the left pane?

i am also looking to remove this option but have not been able to find it in any of the modules.

Similar Question

dclaxton's picture

How can I change the query that runs on the Winuser console to exclude all tickets? My company would like for the end-users to see everything execept for the list of tickets, regardless of their status. Anybody know how to accomplish this?

Never mind...its not really possible without generating errors or a strangely empty screen. I found an alternative.

DC

RE:Similar Question

mabdelnabi's picture

1)Search in the ConsoleMyHD template - or your custom ConsoleMyHD if you created one- for:
<aw:WebGrid ID="wgWorkItems" RunAt="server" AllowSorting="true" AllowColumnSizing="true"

2)Replace the above line with:
<aw:WebGrid ID="wgWorkItems" visible ="false" RunAt="server" AllowSorting="true" AllowColumnSizing="true"

3)Save and then refresh your Winuser Console. It should be gone.

Can't find it

My custom ConsoleMyHD doesn't have that string in there?

Any other place i can find it?

Danny

FOUND IT

NICE!!!

Thanks man, I needed this.

The customized page can only be a subset

Hi David, it is such a helpfull step by step information that you posted up here. It helped me a lot when I customized my helpdesk console. I have one serious problem though. I wanted the users to access the custom console by clicking on a separate link than the regular "Create a new incident" link. I didn't want the new fields and dropdowns that I added to the custom console to be visible from the regular link to creating new incidents. After making the customization to the new console, it's fields are showing up when users try to create tickets using the regular console. Is there any way so that the custom fields show up only on the custom console and not when the regular "Create a new incident" link?

Here is what the Altiris helpdesk customization documentation says about this kind of customization. "The customizatino creates a new console that only exposes a SUBSET of the worker console's commands from the other consoles (example: winuser console to make them available in your cusom console)". In short, is there any way to have a custom console that has new fields and dropdowns that will only be viewable from the custom console and NOT from the regular winuser console?

Winuser Item List

When i bring up the list of items on the winuser console it only displays 15 items. How can i expand that and also how can i edit the column sizes? thanks

scripts

I've now done a number of customizations adding scalar and lookup fields. To aid in this, I've created two scripts to do all the database work. After running these, all that is left are the form customizataions. For the lookup, I've also inserted the row into lookup_info so that the lookup values can be managed via the GUI.

------------------------------------------------------------------------
--
--  This script executes all the database changes required for adding
--  a scalar field to the Altiris_Incidents database.
--
--  It is currently configured to add a 'bldg_room' field.
--
------------------------------------------------------------------------

-- Add the new column to the workitem table
ALTER TABLE workitem ADD bldg_room nvarchar(100) NOT NULL DEFAULT(N'')
GO

-- Update the view_Def table with information about the new column
EXEC sp_addviewdef N'workitem_only_view', N'workitem.bldg_room AS workitem_bldg_room', N''
GO

-- Drop and recreate the workitem_only_view
EXEC sp_createHDDview 'workitem_only_view', 'workitem'
GO
EXEC sp_createHDDview 'workitem_detail_view', 'workitem_only_view'
GO

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
GO

CREATE VIEW dbo.workitem_current_view 
AS
SELECT workitem_detail_view.*
FROM workitem_detail_view
WHERE (workitem_is_last = N'1')
GO

And the Second script,

------------------------------------------------------------------------
--
--  This script executes all the database changes required for adding
--  a lookup field to the Altiris_Incidents database.
--
--  It is currently configured to add a 'building_lookup_id' field which 
--  is a lookup against the 'workitem_building_lookup' table, 
--  which is also created and populated.
--
--
------------------------------------------------------------------------
set nocount on

-- Add the new column to the workitem table
if NOT EXISTS (select * from syscolumns where name = 'building_lookup_id' and id = object_id(N'dbo.workitem'))
BEGIN
  ALTER TABLE workitem ADD building_lookup_id int NOT NULL DEFAULT(1)
END
GO

-- Create the new table
if NOT EXISTS (select * from syscolumns where id = object_id(N'dbo.workitem_building_lookup') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
  CREATE TABLE dbo.workitem_building_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
GO

if NOT EXISTS (select * from dbo.workitem_building_lookup where id = 1)
BEGIN
-- Insert the first row which will be used when nothing is selected
  INSERT INTO dbo.workitem_building_lookup (id, status, value, ordinal, is_default)
  VALUES ('1', 'i', '', 1, '1')
END
GO

-- Create the new view to hold the lookup results
INSERT INTO query (name, expression, cache_results)
VALUES (N'BuildingList', N'SELECT * from workitem_building_lookup WHERE lower(status)=N''a'' order by value', N'1')
Go

-- Update the view_def table with information about the new column
EXEC sp_addviewdef N'workitem_only_view', N'workitem.building_lookup_id AS workitem_building_lookup_id', N''
GO

-- Update the view_def with lookup-specific information to the Table
-- The first statement add the 'value' field as well as the join to the lookup table
-- The second statement doesn't need the join, because it will be handled by the first
EXEC sp_addviewdef N'workitem_detail_view', 
                   N'wbl.value AS workitem_building_lookup_value',
                   N'LEFT OUTER JOIN workitem_building_lookup wbl ON workitem_building_lookup_id = wbl.id'
GO

EXEC sp_addviewdef N'workitem_detail_view', 
                   N'wbl.ordinal AS workitem_building_lookup_ordinal',
                   N''
GO

-- Drop and recreate the workitem_only_view
-- The following code is always used to review the views after adding/removing rows from view_def
EXEC sp_createHDDview 'workitem_only_view', 'workitem'
GO

EXEC sp_createHDDview 'workitem_detail_view', 'workitem_only_view'
GO

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
GO

CREATE VIEW dbo.workitem_current_view 
AS
SELECT workitem_detail_view.*
FROM workitem_detail_view
WHERE (workitem_is_last = N'1')
GO

Worker Console

Adding a lookup field in the Winuser console was fantastic! Although is there anyway to 'link' these to the Worker Console as well?
When our Helpesk Workers log calls they need to see the same lookup fields that the Users are using..

Cheers