Add Searching Capability to ITSM Attributes

Introduction

In this sample, an attribute is added to the Product entity, and then we proceed to add the ability to search on this new attribute. This enhances the base search form, which doesn't, by default, extend to searching across attributes.

Epicor ITSM (known as "Clientele ITSM" in the EMEA region) is deliberately architected in a way that provides an open platform to software developers. Visual Studio.NET can be used to easily customize the off-the-shelf product.

Step 1 - Add an Attribute

Access the Manage --> Attributes menu, and add a new Attribute with the following configuration:

Figure 1: Settings for new Attribute
Figure 1: Settings for new Attribute

In addition, you will need to set the "Assigned Form" property to "Module=Product; Form=ProductDetailForm"

Step 2 - Alter the database view

Modify the ProductList SQL Server View that is used for searching Products:

  • add this line to the bottom of the SELECT clause:
dbo.AttributeValue.ValueShortText AS AttributeValue
  • add this line to the bottom of the FROM clause:
LEFT OUTER JOIN dbo.AttributeValue ON dbo.Product.ProductID = dbo.AttributeValue.ParentID

Step 3 - Alter the Dataset

Follow these steps to get the new field, that we have just added to the view, also added to the dataset:

  • Create a new "Customized DataSets" Visual Studio project and choose the "Product.DataSet" assembly
  • Open "ProductListDataSet.xsd" and add "AttributeValue" to the bottom of the designer view of the dataset (see Figure 2)
  • Switch to XML view and make sure the minOccurs="0" attribute is added, to allow a NULL entry (see Figure 3)
  • Build the project
  • Run the ITSM Web Config Wizard to "Deploy new files and server customizations"

Figure 2: Add the AttributeValue field
Figure 2: Add the AttributeValue field

Figure 3: Set minOccurs=0
Figure 3: Set minOccurs=0

Step 4 - Customize the Search Form

  • Create a new "Customized Client" Visual Studio project and choose the "MpProduct.Client" assembly
  • Add a new item and choose "Client ... Customized Form", then choose "MpFindProductForm"
  • Add a label to the form with these properties set:
    Location:260, 164
    Size:96, 20
    Text:Barcode No.:
    TextAlign:MiddleRight
  • Add a text box to the form with these properties set:
    Name:txtAttributeValue
    Anchor:Top, Left, Right
    CriteriaColumn on m_CriteriaProvider:AttributeValue
    Location:356, 164
    Size:160, 20
    TabIndex:24
    Text:
  • Build the project
  • Run the ITSM Web Config Wizard to "Deploy new files and server customizations"

The customized form should look like this: Figure 4: Customized Find:Products Form
Figure 4: Customized Find:Products Form

The customization is now complete, and searching of Products can be done across the new "Barcode Number" attribute.

Conclusion

What we have demonstrated here is an example of adding an Attribute, and then providing the ability to search on the new attribute. One limitation of this example is that it is restricted to only one attribute on a dataset. A more detailed solution would be required if it was necessary to search across more than 1 attribute on a particular dataset.

This sample has shown how the open architecture of Epicor ITSM allows it to be customized quickly and effectively.

Thanks to MProof for the tips provided while this idea was being investigated!