transfer no in the header form to line subform

karuchuakaruchua Member Posts: 151
i want to transfer my RFQ No. in the header to the lines document number but somehow my code is failing.


i have the following code on my header in a function as known as FnInsertRFQlines
LRFQLine.INIT;
LRFQLine."Document Type" := "Document Type";
LRFQLine.Department := Department;
LRFQLine."Document  No" :="RFQ No.";
LRFQLine."Created By":=USERID;
LRFQLine."Date Created":="Raised Date";
LRFQLine."Transaction Date":="Posting Date";
LRFQLine.INSERT;


then i have the following code on my RFQ nUMBER
 IF "RFQ No." <> '' THEN BEGIN
   CASE "Document Type" OF
     "Document Type"::RFQ:
     BEGIN
      LRFQLine.RESET;
      LRFQLine.SETCURRENTKEY("Document Type",Department,"Document  No","Line No.");
       LRFQLine.SETRANGE("Document Type","Document Type");
      LRFQLine.SETRANGE(Department,Department);
      LRFQLine.SETRANGE("Document  No","No.");
       IF LRFQLine.FINDSET THEN
         LRFQLine.DELETEALL;

       FnInsertRFQlines(Rec);
     END;
  END;
end;


and i have also set my subform link property right,wot am doing wrong

Comments

Sign In or Register to comment.