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

Community site session details

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

Creating Purchase Quote using AL Code

(1) ShareShare
ReportReport
Posted on by 155
Hi All,
 
I have a requirement to create PQ from Project Lines.
I display a list of Project lines in a custom page. The user will select the lines and click on Choose Vendor . Here i need to display a dialog or something to choose multiple vendors.
Kindly give an idea about choosing vendors in a dialog.
 
Then for each vendor , I have to create PQ using AL Code. Kindly guide about creating PQ using AL Code.
 
thank you for any help!
I have the same question (0)
  • Dej Profile Picture
    155 on at
    Creating Purchase Quote using AL Code
    Thank you very much, I am able to get the list of vendors chosen.
     
    Can you please answer my another question? (  Kindly guide about creating PQ using AL Code.)
    for the selected lines against the chosen vendors, i need to create Purchase Quotes (multiple quotes if multiple vendors chosen) .how can i achieve this?
    Thank you for your valuable time!
     
  • Tech-Lucky Profile Picture
    1,255 Super User 2025 Season 2 on at
    Creating Purchase Quote using AL Code
    Yes you can select lines by three dots i just want to make it easy for you to filter these selected lines.
     
    for the vendor selection lookup see the below attachment:
     
     
    This is a Built in Function on Vendor List Page just use the List page to Lookup the vendors and use this function to get the selected vendors and you may store the string to a Text variable that can be used to filter the vendor record variable while you are generating the PQ.
     
    here is the example how to use the above function:
     
        procedure TestCase()
        var
            VendorList: Page "Vendor List";
            SelectedVendors: Text;
        begin
            VendorList.LookupMode(true);
            if VendorList.RunModal() = Action::LookupOK then
                SelectedVendors := VendorList.GetSelectionFilter();
        end;
     
    Please mark this answer as varified if this was helpful.
     
  • Dej Profile Picture
    155 on at
    Creating Purchase Quote using AL Code
    Thank you @Tech-Lucky



    I'm a newbie in AL. Could you please provide any sample code to start with

    I can add a checkbox to select the lines. But Is it not possible to select the lines using readily available three dots and Select more ?

    How can I show a dialog for selecting multiple vendors? please help
  • Suggested answer
    Tech-Lucky Profile Picture
    1,255 Super User 2025 Season 2 on at
    Creating Purchase Quote using AL Code
     

    Hi,

    I’ve developed a Procurement Module that supports multiple vendors and item combinations, enabling you to create multiple quotes.

    For your case, here's a streamlined approach:

    1. Add a Boolean field ("Select") on your Custom Page to mark project lines for inclusion in the quote.
    2. Use a lookup to select vendors and create a filter to identify the selected vendors.
    3. Filter the planning lines based on the "Select" field, then generate a quote for each vendor.
    4. After creating the quotes, clear the "Select" field for any further modifications.

    Let me know if that aligns with your needs!

     

     
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,899 Super User 2025 Season 2

#2
Sumit Singh Profile Picture

Sumit Singh 2,444

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,304

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans