The Visual Warehouse Enquiry can be extended to show custom overlays. An overlay shows warehouse information relating to elements of warehouse (zones, racks, bin, etc) overlaid over a visual floorplan representation. This functionality has been designed so that additional overlays can be created.

To create a new overlay the following steps are required.

  1. Extend the "Whse. Layout Element Overlay WHPTMN" Enum with an entry for the new Overlay.
  2. Subscribe to the event OnCaseFormatLayoutElement of codeunit "Whse. Floor Plan Mgt. WHPTMN". This event is called for each element displayed on the floor plan where a custom entry exists in the "Whse. Layout Element Overlay WHPTMN" Enum.

This event has the following parameters:

  • LocationCode: code[10]

The Location the visualisation is being displayed for.

  • ElementType: enum "Whse. Layout Element WHPTMN"

The type of element (i.e. Zone, Rack, Bin, etc.)

  • ElementCode: Code[20]

The code of the element (i.e. the Bin Code)

  • Overlay: enum "Whse. Layout Element Overlay WHPTMN"

The type of overlay as created in step 1.

  • var ElementLabel: Text

This should return the text string to be displayed on the overlay. i.e if the overlay was to show the date of the last take from the warehouse element this should return the data as a string.

  • var ElementColour: Code[10];

This should return the colour to highlight the element as a html colour (i.e. #FF0000 for red). It is strongly recommended to maintain consistency the one of the colours specified on the setup table("Warehouse Layout Setup WHPTMN") is utilised.

  • var ElementOpacity: Decimal

The element Opacity is a value between 1 and 50 the determines the opacity of the overlay. 50 is the maximum so the underlying floorplan can still be displayed. The value can be varied to provide heatmap style visualisations.

  • var ElementTooltip: Text

Additional text that is displayed on a tooltip if the user hovers the mouse over the warehouse element. This value is optional. This can be either text or html.

Note: Creating an new overlay will update both the Location and Rack views in the enquiry.


Example: Creating a new overlay to show the date of last activity

This example will create an additional overlay on the Visual Warehouse Enquiry to display the date of the last activity.

 1. Add a new overlay option:

enumextension 50000 "Custom Layout Overlay" extends " Whse. Layout Element Overlay WHPTMN "
    value(50000; "Last Activity Date")
        Caption = ‘Last activity Date’;

2. Handle the formatting of the overlay:

[EventSubscriber(ObjectType::Codeunit, Codeunit::"Whse. Floor Plan Mgt. WHPTMN", 'OnCaseFormatLayoutElement', '', false, false)]  

local procedure OnCaseFormatLayoutElement(LocationCode: Code[20]; ElementType: enum "Whse. Layout Element WHPTMN"; ElementCode: Code[20]; Overlay: enum "Whse. Layout Element Overlay WHPTMN"; var ElementLabel: Text; var ElementColour: Code[10]; var ElementOpacity: Decimal; var ElementTooltip: Text)

        WarehouseEntry: Record "Warehouse Entry";
        WhseFloorPlanMgt: Codeunit "Whse. Floor Plan Mgt. WHPTMN";
        BinFilter: Text;
        BinFilter := WhseFloorPlanMgt.GetBinFilter(LocationCode, ElementType, ElementCode);
        case overlay of
            overlay::"Last Activity Date":
                    WarehouseEntry.SetRange("Location Code", LocationCode);
                    WarehouseEntry.SetFilter("Bin Code", BinFilter);
                    If WarehouseEntry.FindLast() then begin
                        ElementLabel := Format(WarehouseEntry."Registering Date");
                        ElementColour := '#ffffff';
                        ElementOpacity := 0.5;
                        ElementTooltip := '<b>' + Format(ElementType) + '</b><br>' + ElementCode + '<br> 
                          'WhseFloorPlanMgt.GetElementName(LocationCode, ElementType, ElementCode) + 
                          '<br>' + Format(WarehouseEntry."Registering Date");