This is the code and when system hit the DELETEALL function, I am getting "The 'record' already exists. Identification Fields and Values: <All the filter values here>"
NOTE: pblnDeleteAll is false.
lrecRentalComments.SETRANGE("Document Type", "Document Type");
lrecRentalComments.SETRANGE("Document No.", "Document No.");
lrecRentalComments.SETRANGE("Line No.", "Line No.");
IF NOT pblnDeleteAll THEN
lrecRentalComments.SETRANGE("Copied from Equipment",TRUE);
lrecRentalComments.DELETEALL;
0
Answers
The error will tell you which table the duplicate record is being created in so look at the code where you are inserting into that table and work out why you are inserting duplicates.
Hi Kishorm,
You are 100% correct about the duplicate entry. After inserting records first time, they are passing records to another variable by reference and then re-inserting these records again after changing some fields.
Could you please suggest some possible solutions for this issue? I am really stuck here.
Thanks,