Table field ordering removing records

Hi! Some of our reps have been having issues with records being removed from a table when they sort the table by a specific field. For example, when the page loads, they have 98 records, but when they sort it by timezone, there are only 92 records appearing in the table. None of the records have a null value for the timezone field. Has anyone else experienced something like this and know of a solution? Thank you!

What object is your table showing data from?

Lead, would you like me to post the xml?

Yes, the XML would be great. Is the “Timezone” field that you’re sorting on a custom field, or a standard field (I’m not aware of any standard Timezone field on the Lead object but maybe I’m missing something)? Is this happening for all your users, or just some of them? (Specifically does it not happen for Admins but does happen for regular users?)

























































models.saved





























































































































































































































































































Open
Disqualified
Long Term Follow-up
Qualified
Return to Data Research
Return to Marketing
Working Another Contact at Company























timezone is a custom field on our end, and it is in the “My open and working Leads” tab

Were you ever able to figure out why this issue may be occurring?? Thank you!

The XML you provided isn’t complete. It’s supposed to have a section of components & resources. Your XML stops abruptly after a model in models with “&nbsp”.

























































models.saved





























































































































































































































































































Open
Disqualified
Long Term Follow-up
Qualified
Return to Data Research
Return to Marketing
Working Another Contact at Company























Can you check the Field Level Security on the Timezone field for these reps? 

Looks like the Model has 20 rows in it to start with — do your reps hit “Load More” until all are showing, and then re-order?

Field level security for timezone is good for these reps and when they reorder by timezone, sometimes they press “load more” and sometimes they do not, either way, records are removed

So records are removed even if they have not pressed Load More at all?

correct, when the table originally loads, the correct number of leads are pulled. whether or not the rep presses load more, and then sorts by timezone, some leads are removed from the table

Megan,

I think I’ve seen this before (Check out Ben’s response to this post) and the fix was to add Id to your Model’s default Order By. Our conclusion was that this is a bug in Salesforce’s StandardSetController that causes it to skip rows with duplicate values when sorting. Does that make any difference?

So by “Add Id to your Model’s default Order By”, you’re saying to change your Model’s “Fields to order records by” property so that if it is:

- currently blank —> change it to “Id”
- currently anything else, e.g. “CreatedDate DESC” —> add “, Id” to whatever it currently is, e.g. "CreatedDate DESC, Id"

Let us know if that works Megan.

Thank you so much! This worked!! I really appreciate everyone’s help!