Hi,
I have a customisation that is attempting to prevent duplicate lot numbers from being scanned on the mobile App (IN301020) and Receipts (IN301000)
INReceiptEntry is overriden to throw an exception whenever:
- There is a lot number already persisted to the database, or
- The Lot number already exists on the unpersisted receipt.
Condition a. works as required. The screen shot below shows the outcome of attempting to scan lot # 1234 which already exists in the database.

The error message is in the header, and this is visible when using the mobile App.
However condition b. behaves differently, 1234z doesn’t exist in the database. On fist scan it gets added.

No problem there. However when scanned again, the error messaging is appearing on the line, instead of the header.

The issue I have is that this error messing isn’t visible on the Mobile App. What I’m looking to acheive is to have an error message display on the header when condition b. ocurrs.
In terms of the cusomisation, there is a FeildVerifying event on INTran.lotSerialNbr

And another on INTran.qty (also in the INReceiptEntry extenstion). The idea is that this detects condition b

So, it appears that the FieldVerifying event when a row is being added to InTran is being treated slightly different than when a row is being updated.
My thinking (which may not be correct) is that the only way to resolve this is to extend the graph behind Scan and Receive (INScanReceive) as opposed to just Receipts (INReceiptEntry)
However, the INScanReceive code is a bit different to what I’m used to. It has a Host member for INReceiptEntry

And when you attempt to extend it via the UI, the code generate is:

Which obviously doesn’t compile (due to the + in the name of the class). I’m not sure what the signature of the class should be (or even if I’m on the right track). Looking at what INScanReceive is derived from I see:
- INScanReceive derives from WMBase
- WMBase is defined as INScanRegisterBase<INScanReceive, INScanReceive.Host, INDocType.receipt>;
- And then

I’ve also had a look at the DAC for the header of Scan Receive. It’s ScanHeader,

Which sits in PX.BarcodeProcessing which is an external DLL. After including the reference, I tried adding in the highlighted lines below:

I can see a ScanHeader object sitting in the cache and am wondering if you can raise an exception on the object. Perhaps this is possible and my syntax isn’t quite right.
Thanks in advance for any advice/solution on the above,
John.






