1.In the tracking specification table we have added a field named barcode scan. (this field is kept to fetch the barcode number from barcode scanner)
2.In the form tracking line for e.g. from sales order.
For a particular item in tracking line, a Barcode scan will scan an particular barcode number and fill the field which we have newly created (barcode scan field). This number will be combination of item category code, Item, Serial number, Lot number.
3.For the particular item, the serial number and lot number will be split and put in the serial number and lot number field of reservation entry, and lot more filed in order to insert in that field is taken care.
4.Inserting is happening in the reservation entry table. But in the form once when we come out of the item tracking form and get inside only, the serial number and lot number is visible in the field.
5.I have tried putting currform.update, currform.updatecontrols in the triggers.
Yet, its not updating the serial number and lot number as soon as we split the barcode number from the barcode scan field.
How do we update this form?
We have written code in tracking specification table in the newly created field barcode scan in On Validate trigger.
So, how do we rectify this problem???:-((
0
Comments
I updated the form with that field and when I fill the test field and press enter, the form displays the proper values, that means that it works just fine, without adding anything else.
Why don't you show your code? aybe there is something wrong there.
Arhontis
https://forum.mibuso.com/search
For taking effort to help us.
After writing the code in table for splitting the string, how did you update the form.what function you used, can u tel me and where to use??
Anyway i will give my code for ur referance. check and tell me.
In tracking specification table i have added a field as Barcode scan and in onvalidate of that feild i have wrriten this code.
This code is written for all the areas where i have to apply barcode scanning in tracking form like Item journal,Item reclassification,Consumption journal,Warehouse receipts and few more areas.
The logic behind this code is.I will get the barcode number in a feild tracking specification form and i will spilt the serail no,lotno,item,item category code,and insert the serail no,lot no alone in reseravtion table along with few other feild that is needed to insert in that reservation table compulsaryly.
The serail no and lot no before inserting ,i am checking it with item ledger entry for validation whether serail no,lot no inbound only has oubounded.
In warehouse receipt form, item tracking form where should i put function for updating the form or should i need to put in table.Tell me???
In the OnValidate routine of the new field in the table I placed the copystr code and I just placed the new field on the Tracking form.
Nothing else...
In your code, you never use VALIDATE function why? I think you should, it's a good way to know that your data is OK.
At the start, when initializing the recResEntry, you should use LOCKTABLE cause the Entry no might be used by some other user... See an example at Codeunit 12, function InitCodeUnit.
You have nowhere the assignment of: How come and the values are saved in the table?
If you don't assign the values to the Lot No. and the Serial No you these will not be updated into the form!
In addition consider using CASE statement instead of the multiple IF and group the case so that you use less code.
Arhontis
https://forum.mibuso.com/search
I have Assigned the serial no and lot number in reservation entry.Before assigning, few conditions are checked for serial number, lot number in item ledger entry.These conditions are checked in order to have serial number & lot number both same in inbound and outbound.
I have assigned all other defualt feild of reseravtion entry also in order to get inserted in to the table.From reseravtion entry table only, the tracking specification table values are got.
All that means that all work ok?
Arhontis
https://forum.mibuso.com/search
Why don't you use Amount, Serial No. and Lot No. also as filter then it will search faster? (try to use SETFILTER)
You were looping the rec RecItmLedEntry for overall records, but you didn't quit the loop after you found IF (recItmLedEntry."Serial No." = varserailno) AND ( recItmLedEntry."Lot No." = varLotno)Then if there're more than one record found, you only got the last one, didn't you?
and this last would be inserted to recResEntry.
that's all about it.
Filtering would make the code very faster, I can't understand why I didn't see it!
Arhontis
https://forum.mibuso.com/search
can anyone help?