Quote Line Items - Sort and Numbering Workaround - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Kyle HurlbutKyle Hurlbut 

Quote Line Items - Sort and Numbering Workaround

This took me a ton of time, so I will share it to avoid it for others.  I am realatively new to Salesforce but it as a suprise that making a quote is still in the stone age.  Even with Summery '10 release.

Have fun with my Hack, Kyle

Quote Line Item and sort order bug fix - workaround is to manual sort the product order in the opportunity and then if you do the steps below you can manually add a Item# for each line of the quote. The Item# default to 1 so your first quote will look a bit funny if you order fill in the Item#. If you try this, Might do it in a Sandbox first.

SANDBOX ADD CUSTOM FIELD | Setup | Customize | Quote Line Items | New | Field Label - Item # | Length - 4 | Decimal - 0 | Field Name - Item Number | Help Text - 1.1 Item # (Item_Number) is a sequential line number for each item in the quote. | Required - not checked | Unique - not checked | Default Value - 1| Visible - for all | Next | Add Field - (checked) | Quote Line Item Layout (checked) | Save | SANDBOX FIX QUOTE LINE ITEM PAGE LAYOUTS | Setup | Customize | Quotes | Quote Line Items | Page Layouts | New | Existing Page Layout - Quote Line Item Layout | Page Layout Name - 1.1 Quote Line Item Layout | Save | Item Number (drag from the top and place under Quantity if it is not already there) | Save |

SANDBOX FIX QUOTE PAGE LAYOUT - | Setup | Customize | Quotes | Page Layouts | New | Existing Page Layout - Quote Layout | Page Layout Name - 1.1 Quote Layout | Save | Quote Line items (click on wrench to change) | Item Number (add to Selected Fields and put after Product, may have to remove Subtotal) | Sort by: Item Number | Ascending (check) | OK | Save

SANDBOX FIX QUOTE TEMPLATE | Setup | Customize | Quotes | Templates | New | Existing Page Layout - (clone from latest) | Page Layout Name - 1.1 Quote Template | Quote Line Items - click on wrench | Item# - Add | Up - to be the first Selected Field | Line Item Number - Remove | OK | Save |

SANDBOX TEST - make a quote for TestKyle BCOM IQnxn 2x2 using the correct template.

Mark PassovoyMark Passovoy
I always appreciate Workarounds.

Thanks Kyle.
Matt BrownMatt Brown
Yeah sort on some SFDC line items is still a little archaic. Always good when a solution is provided to help folks out. Thanks.
Erica KuhlErica Kuhl
 @Kyle - thanks SO much for posting this for the Community - always greatly appreciated!
Anoop ShahiAnoop Shahi
  Hello

We have tried this but no matter which column we ask SF to sort by, it is always sorted by the Product name. Does anybody have any ideas where we could be going wrong or of something obvious we may have missed?

The Quote Line Items are always sorted by Product even though we've changed the sort option to the custom field we created as above and even tried another text field.

Thanks.
 
Customer SupportCustomer Support
I'm experiencing the same issue. Any insight would be appreciated.
Tom BarberTom Barber
I'm confused. I follow the above instructions but the option to sort by a field on the Quote Line Item related list section on the Quote page layout does not appear at all.

We are on Winter '11 now. Could this have changed?

The help screen for customizing the related list on page layouts may offer a clue:

"Select a field from the Sort By drop-down list to sort the items in the related list, which will be displayed in ascending order unless you select Descending. The default sort order varies per record. The Sort By drop-down is not available for activities and opportunity products."

---hmmmmm: "not available for activities and opportunity products" huh. Could the quote line item behavior be essentially the same as opportunity products? They are, after all, very similar.

If so, then it would make sense that you cannot sort the line items on the Quote Line Items related list for the Quote object.
Mark PassovoyMark Passovoy
It looks like this may have changed. I assume that at one point you could sort Quote Line Items, but it looks like that sort option has been removed from the related list options on the page layout.
Kristin RiderKristin Rider
I also need to sort my Quote Line Items on the PDF, and not by Product name! Frustrating!
Frederique GAUTHIERFrederique GAUTHIER
Hi,

I would like to sort Product by quantity (instead of Product Name) in quote line item. Is there a way to display quantity on the "sorting page"?

User-added image

Thanks,
FG
Tim MizeTim Mize
I am on the 18 Lightning build and this works for us. A few steps in adding fields are a little different then above, but this works. Once completed, you will see the column Item # with nothing in it if you already have products in the quote. If you have no products, then go ahead and add them as needed. Then click on view all and a new window will open. You can then edit each product to add the correct item number sequence. We use QuotePDF for creating our emailed version and the line item sort carried thru. Finally and thank you very much for the directions.
Deirdre LiDeirdre Li
Hi @Tim Mize,
Could you please share how you approached this in Lightning, and how the steps were different? I would like to test this out in the Sandbox for our reps, as we also use Quote PDF for emailing. Thank you!