Dear all
we are trying to convert sales order to Purchase quote. But while converting only one item is only converting to quote?
what may be the issue? is anything wrong in the code?


page 50003 "Purch. Quote From Sales Order"
{
Caption = 'Create Purchase Quotes';
layout
{
area(content)
{
repeater(Group)
{
field("No."; "No.")
{
}
field(Description; Description)
{
}
field("Demand Quantity"; "Demand Quantity")
{
Caption = 'Sales Order Quantity';
}
field(Vendor; VendorName)
{
Caption = 'Vendor';
}
field(Quantity; Quantity)
{
Caption = 'Quantity to Purchase';
}
}
}
}
actions
{
area(processing)
{
group("Set View")
{
Caption = 'Set View';
action(ShowAll)
{
Caption = 'Show All';
}
action(ShowUnavailable)
{
Caption = 'Show Unavailable';
}
}
}
area(navigation)
{
group("Item Availability by")
{
Caption = 'Item Availability by';
action("Event")
{
Caption = 'Event';
}
action(Period)
{
Caption = 'Period';
}
action(Variant)
{
Caption = 'Variant';
}
action(Location)
{
Caption = 'Location';
}
action(Lot)
{
Caption = 'Lot';
}
action("BOM Level")
{
Caption = 'BOM Level';
}
action(Timeline)
{
Caption = 'Timeline';
Visible = false;
}
}
}
}
var ItemAvailFormsMgt: codeunit "Item Availability Forms Mgt";
OrderNo: Code[20];
EntireOrderIsAvailableTxt: Label;
ShowAllDocsIsEnable: Boolean;
VendorName: Text[100];
CannotCreatePurchaseOrderWithoutVendorErr: Label;
}