Skip to main content

Notifications

Announcements

No record found.

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

Sales order to Quote

(0) ShareShare
ReportReport
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 47 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans