How to maintain the sequence of records in a related list added inline

I replicated this issue in my Skuid pages and also found that I experienced the same reordering issue when mass importing CSV records into Salesforce. The Salesforce database appears to batch process records in parallel, rather than serially, which means that any mass create action will result in records that appear out of order in an unordered and unsorted table.

I found that sorting by CreatedDate and LastModifiedDate generate the same issue.

  • I would suggest ordering by the Line Item Description field name.

I think you already know where to change that setting because you mentioned that you had attempted to order by CreatedDate DESC. This next part is for anyone else who searches for a similar issue:

You can set that by selecting your Model in the Model tab and clicking the Advanced button. Then you can change “Fields to Order Records by” to the field name for Line Item Description in ascending order. If the field name is LineItemDescription__c, then you would input that field name with a space and then ASC (for ascending) or DESC (for descending).

  • If ordering by Line Item is not helpful, then the next best thing might be to create a new custom field in your Opportunities object that holds a record order number. After you add this field to your Skuid table, you can number the items according to your needs and can set the table to sort by this number. This does mean that you have an extra field to input when creating new records, so it is not an elegant solution.

Sorry that there is not a simple answer to this one. Let me know if you there is anything else we can do.

-Josh