Creating MS RMS COM Component Add-Ins

Introduction:

Microsoft Retail Management System offers numerous solutions to stores (single or multiple, small or large) in the retail industry. The various functionalities include store management, purchase order management, transaction processing, point-of sale solutions, reports and receipts processing.

Customizing RMS:

MS RMS is a highly customizable product. We can extended the functionality or modify the design of RMS products through customization. Creating customized addin helps in extending the functionality of POS or store operations manager helping retailers in their business process. 3 types of add-ins can be created

1. COM component add-in

2. HTML add-in

3. Standard EXE add-in

In this article we will focus on creating and invoking COM component add-ins.

Creating Custom COM Component Add-In:

Before learning about COM component add-ins, let’s first discuss what [QSRules] is. QSRules includes a set of classes containing the core business and database access logic of POS (Point-Of-Sale) system. It has several in built classes, methods, properties defined such as [Session Class], [Register Class], [Transaction Class], [Tender Class] etc.

The current type of add-in is the most useful one and uses [QSRules] to interact with transaction in progress. This add-in can be activated from custom POS button or specific points in transaction flow through hooks. COM component add-in are created as active x dlls and used to extend the functionality of POS as per customer’s requirements.

Following are the steps to create COM component add-in

The session object is passed as the parameter. When the add-in is invoked the Store operations passes a reference to current session (session class object of QSRules) to the [currentSession] object.

Following is sample code for the Process function in VB.NET. When invoked this will only display the current logged in cashier’s name.

[VB.NET code starts]

Public Function

Process(ByVal currentSession As Object) As Boolean

MsgBox("The current cashier is " & currentSession.Cashier.Name)

'set process true

Process =

End Function

True

[VB.NET code ends]

Invoking Custom COM Component Add-In:

COM component dlls can be invoke in 2 ways

  1. By creating custom POS buttons
  2. By creating store operations hooks

Invoking through custom POS buttons:

  • To create a custom POS button that invokes the add-in dll, we need to add a
    record to [CustomButtons] table either through Store operations or using SQL
    Insert query.

  • Following are the parameters we need to set to create a custom POS button
    used to invoke the dll.
    • Number - unique ID for the button (you can use count of records in this table -1 )
    • Style - COM Object (Session Object) value is 7.
    • Caption – caption of POS button
    • Command – ProjectName.ClassName of the dll to be activated
    • Description – description about the custom add-in

  • To create a custom POS button that invokes the add-in dll, we need to add a record to [CustomButtons] table either through Store operations or using SQL Insert query.

  • Now clicking on the POS button will invoke the dll process function.


  • Invoking through hooks

    • To invoke the active x dll from the hook, we need to first increase the count of hooks to count + 1 at above registry key‘s count sub key.
    • Then we need to add the following information in the first available hook key.
      • HookType – type id of calling hook
      • ObjectName – ProjectName.ClassName of the dll to be activated
      • Parameter – parameters required for calling hook
      • Caption – identifying text for hook \ add-in
      • Description –description of add-in
    • Following is a sample registry entry for
    crm reg
    When user hits the ESC key to quit the POS screen, this hook is called by the Store operations and the dll is invoked for to do any action defined.

    Summary:

    We can easily customize RMS products as per the requirement of the customer. MS RMS allows us to customize its features and extend the functionality to fulfill need of store managers or cashiers.