Notifications
Sometimes, it may be useful to notify the warehouse employee with specific information while they are reading the bin code in the mobile application. For example, they can be informed about the available cubic capacity in the bin, if the bin is blocked for certain actions, or if it can contain multiple products.
To accommodate various needs, iDynamics Warehouse includes events that allow easy capture of bin code readings on different screens of the mobile application, making it easier to implement the desired logic and send an appropriate notification to the warehouse employee.
How to send notifications to the Mobile App
OnShowNotificationReadingBinCodeOnDocument
The event OnShowNotificationReadingBinCodeOnDocument, triggered by the "IDPWHS Notifications Mgt" codeunit, allows you to manage notifications related to documents.
local procedure OnShowNotificationReadingBinCodeOnDocument(DocumentType: Enum "IDPWHS Source Document Type";
DocumentSubtype: Enum "IDPWHS Source Document Subtype";
ActivityType: Enum "IDPWHS Activity Type";
No: Code[20];
BinCodeRead: Code[20];
var NotificationMessage: Text)
This event receives the following variables:
- DocumentType. The type of document on which the Bin Code is being read (receipt, dispatch, picking, sale...).
- DocumentSubtype. For sales and purchase documents, the type of "Sales Order" or "Purchase Order". Its index equals the index of the field "Document Type" in those documents.
- ActivityType. For warehouse activity documents, the activity type (Pick, Put-Away, etc.).
- No. The number of the document in which the bin code is being read.
- BinCodeRead. The Bin Code read.
- NotificationMessage. The notification sent to the mobile application once the Bin Code has been read.
Example
[EventSubscriber(ObjectType::Codeunit, Codeunit::"IDPWHS Notifications Mgt", OnShowNotificationReadingBinCodeOnDocument, '', false, false)]
local procedure "IDPWHS Notifications Mgt_OnShowNotificationReadingBinCodeOnDocument"(DocumentType: Enum "IDPWHS Source Document Type"; DocumentSubtype: Enum "IDPWHS Source Document Subtype"; ActivityType: Enum "IDPWHS Activity Type"; No: Code[20]; BinCodeRead: Code[20]; var NotificationMessage: Text)
var
WhseActivityHeader: Record "Warehouse Activity Header";
begin
if DocumentType <> DocumentType::Activity then
exit;
//Implementation of the notification logic on warehouse activity documents.
WhseActivityHeader.Get(ActivityType, No);
NotificationMessage := SetNotificationBinCode(WhseActivityHeader."Location Code", BinCodeRead);
end;
In the above example, the notification management is implemented exclusively for warehouse activity documents.
OnShowNotificationReadingBinCode
The OnShowNotificationReadingBinCode event, issued by the codeunit "IDPWHS Notifications Mgt", allows you to manage notifications on manual movements.
local procedure OnShowNotificationReadingBinCode(ActionType: Enum "IDPWHS Action Type";
LocationCode: Code[10];
BinCodeRead: Code[20];
var NotificationMessage: Text)
This event receives the following variables:
- ActionType. The type of action (Take, Place) in which the Bin Code reading is being performed.
- BinCodeRead. The Bin Code read.
- NotificationMessage. The notification sent to the mobile application once the Bin Code has been read.
Example
[EventSubscriber(ObjectType::Codeunit, Codeunit::"IDPWHS Notifications Mgt", OnShowNotificationReadingBinCode, '', false, false)]
local procedure "IDPWHS Notifications Mgt_OnShowNotificationReadingBinCode"(ActionType: Enum "IDPWHS Action Type";
LocationCode: Code[10];
BinCodeRead: Code[20];
var NotificationMessage: Text)
begin
if ActionType <> ActionType::Place then
exit;
NotificationMessage := SetNotificationBinCode(LocationCode, BinCodeRead);
end;
In the example above, the notification management is implemented exclusively for the "place" action.