The code will work fine if the item no is not repeated on Purchase Receipt. If you have the same item on purchase receipts on two lines, it wont' work. You need to look at item relation table for line specific serial no.
Ahmed Rashed Amini
Independent Consultant/Developer
Answers
I got solution for my question.
Following is the code guys.
ItemLedgerEntry.RESET;
ItemLedgerEntry.SETFILTER(ItemLedgerEntry."Entry Type",'Purchase');
ItemLedgerEntry.SETFILTER(ItemLedgerEntry."Document No.","Purch. Rcpt. Line"."Document No.");
ItemLedgerEntry.SETFILTER(ItemLedgerEntry."Item No.","Purch. Rcpt. Line"."No.");
Repeat
if ItemLedgerEntry."Serial No."<>'' then
Message (ItemLedgerEntry."Serial No.");
Until ItemLedgerEntry.next=0;
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n