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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Exporting a quote to PDF

(2) ShareShare
ReportReport
Posted on by 4
When exporting a quote to PDF for customers the part numbers and descriptions show in an improper alphabetical order. Is there a way to update the product descriptions to have them show properly "in order"? Has anyone dealt with this before? 
I have the same question (0)
  • Verified answer
    Daivat Vartak (v-9davar) Profile Picture
    7,835 Super User 2025 Season 2 on at

    Hi AH-26070314-0,

    There's no easy built-in way to export your quote data as a PDF with product names sorted alphabetically.

    Here's a workaround:


    1. Use Power Automate: Create a special action in your Dynamics 365 system that starts a Power Automate Flow.

    2. Get Quote Products: Power Automate will fetch your quote's products, making sure they are sorted alphabetically.

    3. Find your PDF Template: Locate the PDF template you want to use (it could be stored in SharePoint or OneDrive).

    4. Fill in the Template: Power Automate will fill the template with your quote data, including the sorted product information.

    5. Create the PDF: Power Automate generates the final PDF document.

    6. Save the PDF: The PDF will be saved to a specific folder in SharePoint (linked to your quote) or another chosen location.


    7.  

    I hope this helps! If it does, please give it a "Like." If it completely solves your problem, please "Mark as Verified" so others can benefit from this solution.

    Feel free to ask if you have more questions.

    This response was created with the help of AI to give you the clearest and most helpful instructions for your Dynamics 365 question.

    Best Regards,
    Daivat Vartak

  • Suggested answer
    Saif Ali Sabri Profile Picture
    2,351 Super User 2025 Season 2 on at

    Exporting a quote to PDF in Microsoft Dynamics 365 can sometimes result in product descriptions and part numbers appearing in an improper order, especially if the default export functionality doesn’t sort the data as needed. While Dynamics 365 doesn’t provide a built-in way to sort products alphabetically during PDF export, you can achieve this using Power Automate as a workaround. Here’s a detailed step-by-step guide to implement your solution:


    Solution: Use Power Automate to Export a Quote to PDF with Sorted Products

    Step 1: Set Up the Power Automate Flow

    1. Create a New Flow:

    2. Trigger the Flow:

      • Use a trigger like "When a record is selected" (for manual triggering) or "When a record is updated" (for automatic triggering) in Dynamics 365.


    Step 2: Fetch Quote Products

    1. Get Quote Details:

      • Add an action to "Get a record" to retrieve the quote details using the Quote ID.

    2. Get Quote Products:

      • Add an action to "List records" to fetch all products associated with the quote. Use the Quote Product entity and filter by the Quote ID.

    3. Sort Products Alphabetically:

      • Use the "Select" action to create a new array of products sorted by the Product Name or Description field.

      • Use the "Sort array" action to sort the products alphabetically.


    Step 3: Prepare the PDF Template

    1. Locate the PDF Template:

      • Store your PDF template in SharePoint or OneDrive. The template should include placeholders for the quote details and product list (e.g., {QuoteID}, {ProductName}, {ProductDescription}).

    2. Fill the Template:

      • Use the "Populate a Microsoft Word template" action in Power Automate to fill the template with the quote data and sorted product list.


    Step 4: Generate and Save the PDF

    1. Convert Word to PDF:

      • Use the "Convert file" action to convert the filled Word template to a PDF.

    2. Save the PDF:

      • Save the PDF to a specific folder in SharePoint or OneDrive. You can also link the PDF to the quote record in Dynamics 365 by updating a file attachment field.


    Detailed Steps with Actions in Power Automate:

    1. Trigger:

      • "When a record is selected" (for manual export) or "When a record is updated" (for automatic export).

    2. Get Quote Details:

      • Action: "Get a record"

        • Entity: Quote

        • Quote ID: Dynamic content from the trigger.

    3. Get Quote Products:

      • Action: "List records"

        • Entity: Quote Product

        • Filter Query: _quoteid_value eq [Quote ID]

    4. Sort Products:

      • Action: "Select"

        • Map the Product Name and Description fields to a new array.

      • Action: "Sort array"

        • Sort by Product Name or Description in ascending order.

    5. Populate the PDF Template:

      • Action: "Populate a Microsoft Word template"

        • Template File: Select your Word template from SharePoint/OneDrive.

        • Map the quote details and sorted product list to the placeholders in the template.

    6. Convert to PDF:

      • Action: "Convert file"

        • Source File: Output from the "Populate a Microsoft Word template" action.

        • Target Format: PDF.

    7. Save the PDF:

      • Action: "Create file"

        • Save the PDF to a specific folder in SharePoint/OneDrive.

      • (Optional) Action: "Update record"

        • Attach the PDF to the quote record in Dynamics 365.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans