Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

Sales order to Quote

Posted on by 151

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;
}
  • aryaps Profile Picture
    aryaps 151 on at
    RE: Sales order to Quote

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

  • Suggested answer
    Bilal Haider Profile Picture
    Bilal Haider 43 on at
    RE: Sales order to Quote

    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.

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Sales order to Quote

    Hi,

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

    Thanks.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,113 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,918 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans