web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Sales order to Quote

(0) ShareShare
ReportReport
Posted on by 155

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?

sotopo.jpg

sqtopq.jpg

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;
}
I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,788 Moderator on at

    Hi,

    Can you check the Inventory if already available for those items in the system which are not moved to PQ?

    Thanks.

  • Suggested answer
    Bilal Haider Profile Picture
    442 on at

    Hi,

    Looks like you have copied some of the code from standard action Create Purchase Document. That action creates purchase document for the quantity that is unavailable, may be in your case only one line has items that are unavailable so it is creating only one line. If that is the case then you need to change the code to create Purchase quote for all lines and not check on availability.

  • aryaps Profile Picture
    155 on at

    the item don't have the inventory. if the item has inventory, then also it should accept for create a new purchase quote.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,857 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,047 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans