As a user, I would like to see not only the item ID in the scan message, but also the description. Does anyone know how to extend this?
Unfortunately, I did not find anything in the attributes of the Message field.

As a user, I would like to see not only the item ID in the scan message, but also the description. Does anyone know how to extend this?
Unfortunately, I did not find anything in the attributes of the Message field.

Best answer by darylbowman
This code defines new local variables for the messages with a placeholder for an additional parameter ‘{5}’. The method responsible for displaying messages is overridden to use the local variables. Then, inventory.Descr is passed as a fifth parameter.
// Acuminator disable once PX1016 ExtensionDoesNotDeclareIsActiveMethod extension should be constantly active
public class DXPaperlessPickingExt : PXGraphExtension<PaperlessPicking, PickPackShip.Host>
{
public const string PickItemNoLotSerial = "Pick {2}-{5}, quantity: {0} {1} left.";
public const string PickItemWithLotSerial = "Pick {2}-{5}, lot/serial: {3}, quantity: {0} {1} left.";
public const string PickItemFromLocationNoLotSerial = "Go to {4} and pick {2}-{5}, quantity: {0} {1} left.";
public const string PickItemFromLocationWithLotSerial = "Go to {4} and pick {2}-{5}, lot/serial: {3}, quantity: {0} {1} left.";
// Replaces 'PromptWantedItem()' method from PaperlessPicking.cs
public delegate string PromptWantedItemDelegate();
[PXOverride]
public string PromptWantedItem(PromptWantedItemDelegate baseMethod)
{
SOPickerListEntry wantedSplit = Base1.GetWantedSplit();
if (wantedSplit != null)
{
var similarSplits = Base1.GetWantedSplitsForIncrease();
var inventory = InventoryItem.PK.Find(Base1.Basis, wantedSplit.InventoryID);
var lotSerialClass = Base1.Basis.GetLotSerialClassOf(inventory);
bool noCertainLotSerial =
lotSerialClass == null ||
lotSerialClass.LotSerTrack == INLotSerTrack.NotNumbered ||
lotSerialClass.LotSerAssign == INLotSerAssign.WhenUsed ||
lotSerialClass.LotSerIssueMethod == INLotSerIssueMethod.UserEnterable;
string msg = Base1.Basis.DefaultLocation
? noCertainLotSerial
? PickItemFromLocationNoLotSerial // Changed line to use local variable
: PickItemFromLocationWithLotSerial // Changed line to use local variable
: noCertainLotSerial
? PickItemNoLotSerial // Changed line to use local variable
: PickItemWithLotSerial; // Changed line to use local variable
return Base1.Basis.Localize(
msg,
similarSplits.Sum(s => s.Qty - s.PickedQty),
wantedSplit.UOM,
Base1.Basis.SightOf<SOPickerListEntry.inventoryID>(wantedSplit),
wantedSplit.LotSerialNbr,
Base1.Basis.SightOf<SOPickerListEntry.locationID>(wantedSplit),
// Start added lines
inventory.Descr);
// End added lines);
}
return null;
}
}
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.