Hi,
What is the simplest way to programatically create and allocate Lot numbers to an Inventory receipt?
I have a customisation that creates an inventory receipt, but it won’t release:
Reason for this I believe is that when you go into Line Details you see:
If I add the lot number here and click OK, the receipt will release. What I have ascertained so far is that this process touches a lot more tables than you might think, so there is a bit going on.
After adding the serial number and clicking OK in the “Line Details” dialog box running
exec SearchAllTables @searchStr='77789'
on the SQL database indicates that there are six tables involved:
INItemLotSerial
INItemPlan
INLotSerialStatus
INSiteLotSerial
INTran
INTranSplit
I’m pretty sure that adding data into this tables directly via the customization isn’t the right way to go.
I have tried to use the inspect cusomisation feature to understand what gets called when the OK button is pressed, but because “Line Details” is a modal dialog box this doesn’t work. My question is where does the Method that gets called when the OK button gets click live?
For reference, I have a custom form that provides a tally sheet. When the tally sheet is release I then create an inventory receipt. The code I’m using to generate the inventory receipt is pretty simple shown below:
Then, inside CreateLines there is a command to generate INTran records for the lines:
And, in these are the fields being populated in the InTran record:
Note, that the same Production Tally form is being used to generate either Receipts or Adjustments which is why there is the conditional cast from the graph supplied to the CreateReceipt method.
The signature of the CreateLines method is:
Elsewhere in the code there is a CreateAdjustment method:
Any help greatly appreciated,
Thanks,
John.