Here I create a enquiry card which is when I create a new sales order it gets added in my enquiry list,
But when I add note in sales order and I revisit enquiry page its count is increasing, why it's happening.
Need it's solution please very urgent.
//Procedure code part where I added copylinks function
recEnquiries.Description := rec_SalesHeader."External Document No.";
// recEnquiries."Internal Notes" := rec_SalesHeader.customDeliveryNotes;
recEnquiries.isArchive := false;
recEnquiries.DateCreated := DT2DATE(rec_SalesHeader.SystemCreatedAt);
recEnquiries."Sell-to Customer No." := rec_SalesHeader."Sell-to Customer No.";
recEnquiries."Location Code" := rec_SalesHeader."Location Code";
recEnquiries.Status := rec_SalesHeader.Status;
if rec_SalesHeader.HasLinks then // here I added
recEnquiries.CopyLinks(rec_SalesHeader);
recEnquiries.Insert(true);
InsertSalesLine(recEnquiries.No);
end;
until rec_SalesHeader.Next() = 0;
end;
// Called this procedure in open page trigger
trigger openpage
Var
cd_enq : codeunit enquiry
Begin
cd_enq.insertsalesorder
End;
As I used openpage that's why my notes count is increasing on each visit? Please any solution.