I have created the custom dialog box in which we give the Vendor Name, Vendor No, and one Item No. and Item Quantity, as Input and the Purchase Order, is created.
I have created the Purchase Order, but cannot drop the line details...
So my question is how to drop the line details in PO?
this is how I manually drop the line details, but it still doesn't allow me to post my newly created purchase order.
POLines.Reset();
POLines.Init();
POLines."Document No." := POHead."No.";
POLines."Line No." := 1;
POLines."Document Type" := DocType;
// POLines.SetRange("Document No.", POHead."No.");
POLines.Type := POType::Item;
POLines."No." := ItemNo;
POLines.Quantity := ItemQuantity;
POLines.Description := Item.Description;
POLines."Description 2" := Item."Description 2";
POLines."Units per Parcel" := Item."Units per Parcel";
POLines."Indirect Cost %" := Item."Indirect Cost %";
POLines."Overhead Rate" := Item."Overhead Rate";
POLines."Allow Invoice Disc." := Item."Allow Invoice Disc.";
POLines."Gen. Prod. Posting Group" := Item."Gen. Prod. Posting Group";
POLines."VAT Prod. Posting Group" := Item."VAT Prod. Posting Group";
POLines."Tax Group Code" := Item."Tax Group Code";
POLines.Nonstock := Item."Created From Nonstock Item";
POLines."Item Category Code" := Item."Item Category Code";
POLines."Allow Item Charge Assignment" := true;
POLines."Qty. to Receive" := POLines."Outstanding Quantity";
POLines."Qty. to Receive (Base)" := POLines."Outstanding Qty. (Base)";
if Item."Purch. Unit of Measure" <> '' then
POLines."Unit of Measure Code" := Item."Purch. Unit of Measure"
else
POLines."Unit of Measure Code" := Item."Base Unit of Measure";
POLines.Insert(true);


Report
All responses (
Answers (