How to add an additional Resource Explorer link to a workitem page

Article:HOWTO8306  |  Created: 2007-11-26  |  Updated: 2007-11-26  |  Article URL
Article Type
How To

The scenario is as follows:

The Altiris Infrastructure consists of an Asset Management Suite (AMS) Notification Server which runs Helpdesk Solution, and a Client Management Suite (CMS) Notification Server which manages the environments resources.

Inventory Forwarding is in place, and I wish to allow my Helpdesk workers to run remediation tasks from the AMS Notification Server on the CMS Notification Server's resources, when a workitem is raised in the Helpdesk.

As most actions can be performed from the Resource Manager, this is the logical tool to use. As workitems already have a link to it, however, the link opens Resource Manager on the local AMS Notification Server and not on the managing CMS Notification Server.

How can this process be accomplished?

This can be provided by implementing the following Helpdesk customization. Complying with the Helpdesk 6.0 SP5 product guide ( customization best practice, create the ".\Custom\Templates\" directory structure under the ".\AeXHD\" directory on the Helpdesk Server.

The Resource Manager link is created from the subAssetInfo.ascx file, so this file needs to be copied from the ".\AeXHD\Templates\" directory and placed into the ".\AeXHD\Custom\Templates\" directory. It should then have its "Read Only" attribute removed, be renamed to Custom_subAssetInfo.ascx and have the following modifications applied to it:
  1. Add an additional "Private Const" as this will allow you to add additional customizations to this template easier if you wish to specify the CMS Notification Server (the string value should be the FQDN of your CMS Notification Server):
    1. Private Const CMS_SERVER_NAME as string = "CMS NS FQDN"
    2. Private Const showViewProperties as string = "ShowViewProperties"
    3. Private Const showResExp as string = "ShowResourceExplorer"
    4. Private Const showRemCtrl as string = "ShowRemoteControl"
    5. Private Const showWAfW as string = "ShowWAfW"
    6. Private Const showRTSM as string = "ShowRTSM"
    7. Private Const hideAllOnHandHeld as string = "HideAllLinksOnHandHeld"
  2. Find the following code in the "Public Overrides Sub FinalizeTemplate()" section:

    if (Attributes(showResExp) is nothing OrElse Attributes(showResExp).ToLower = "true") then
     hlResEx.NavigateUrl = a.ResourceExplorerUrl
     hlResEx.visible = true
     hlResEx.enabled = (a.HasRealID AndAlso a.HasResourceExplorerUrl)
     sprAssetResEx.Visible = true
    end if

  3. Replace it with the following code:

    if (Attributes(showResExp) is nothing OrElse Attributes(showResExp).ToLower = "true") then
             'AMS Resource Explorer link
    hlResEx1.NavigateUrl = a.ResourceExplorerUrl
    hlResEx1.visible = true
    hlResEx1.enabled = (a.HasRealID AndAlso a.HasResourceExplorerUrl)
    sprAssetResEx1.Visible = true
     lblAMSServer.Visible = true

    'CMS Resource Explorer link
    hlResEx2.NavigateUrl = String.Format("http://{0}/Altiris/Resource/ResourceManagerConsole.aspx?ItemGuid={1}",CMS_SERVER_NAME,a.Current.asset_resource_guid)
    hlResEx2.visible = true
    hlResEx2.enabled = (a.HasRealID AndAlso a.HasResourceExplorerUrl)
    sprAssetResEx2.Visible = true
    lblCMSServer.Visible = true
    end if

    The hlResEx parameter has been given a suffix of either 1 or 2, so as to identify each Resource Explorer hyperlink. A label (lbl) syntax has also been provided, as we need to be able to identify each link when looking at them from the workitem. The {0} parameter will tell the code to use the value for the "CMS_SERVER_NAME" property, and parameter {1} will tell the code to use the value for the "a.Current.asset_resource_guid" property.
  4. Find the following code in the "<aw:ControlBar ID="cbAssetInfo" runat="server" Label="sidLblAsset" ItemDataSourceName="Asset" Spacing="0">" section:

    <aw:Image runat="server" ImageUrl="icnspacer" ID="sprAssetResEx" Visible="false" />
     <aw:HyperLink id="hlResEx" ImageUrl="icnResourceExplorer" runat="server" target="_blank" visible="false">

    Replace it with the following code: 

     <aw:Image runat="server" ImageUrl="icnspacer" ID="sprAssetResEx1" Visible="false" />
     <aw:Label runat="server" ID="lblAMSServer" Text="AMS:" Visible="false" />
     <aw:HyperLink id="hlResEx1" ImageUrl="icnResourceExplorer" runat="server" target="_blank" visible="false">
     <aw:Image runat="server" ImageUrl="icnspacer" ID="sprAssetResEx2" Visible="false" />
     <aw:Label runat="server" ID="lblCMSServer" Text="CMS:" Visible="false" />
     <aw:HyperLink id="hlResEx2" ImageUrl="icnResourceExplorer" runat="server" target="_blank" visible="false">

    The sprAssetResEx parameters have been given a prefix of either 1 or 2 for easy identification.  The lbl parameters will display a word in TEXT to the right of each Resource Explorer link.  The hlResEx parameters allow the ShowResExp code in the "Public Overrides" section with the sprAssetResEx code in the "Asset Window" section.
  5. Now that the subAssetInfo.ascx template has been customized, a Custom.config file must be created and placed in the root of the ".\AeXHD\" directory, so that the customisation will override the default settings found in the ".\AeXHD\Web.config" file. In order to create the Custom.config file correctly, the subAssetInfo.ascx line must be found in the Web.config file, so run a search for it, and then copy it:  <file id="subAssetInfo" file="Custom_subAssetInfo.ascx"/>
  6. Create the following Custom.config file and place it into the ".\AeXHD\" directory:

    <?xml version="1.0" encoding="utf-8" ?>
      <files path="~/Custom/Templates">
       <file id="subAssetInfo" file="Custom_subAssetInfo.ascx"/>

    The tilde (~) character tells the Helpdesk to look into the root of the ".\AeXHD\" directory.  Without the tilde, the customized files will not be found, and Helpdesk will throw an error.
  7. All that is needed to be done now is to restart the WWW Service and then view a workitem, in order for this customization to take effect:


Both the Custom.config and Custom_subAssetInfo.ascx files are attached to this article, so that this customization can be implemented more quickly. Feel free to change the values to suit your own environment.

Attachments (2 kBytes)

Legacy ID


Article URL

Terms of use for this information are found in Legal Notices