function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
alexannicalexannic 

Cannot access the SortOrder field in OpportunityLineItem!

Hello,
I have been trying to set the order of Opportunity lines, according to the 'date-time created' of each item using the API, but with no luck.
The reason I'd trying to do this is to sort the Opportunity lines by the order they were added to the Opportunity. It is a huge time-waster to sort the items using the 'Sort' button, especially if you are talking about Opportunities - Orders with over 50 different lines.

The SortOrder field is set to null, unless you set the order using the aforementioned button. Does anyone have a clue how the Opportunity lines are sorted by default?

Does anyone have any ideas regarding this mysterious SortOrder field?
Any help would be greatly appreciated!

Thank you for taking the time to read this.

Kind Regards,
Alex N.
(SF Enterprise edition)