0

In visualforce page which use apex:repeat, and also for client side sorting uses datatable.js. A field column with date type is shown. Also the page allows inline editing, on successful edit it will refresh the page to bring updated data. My problem here is,

Record A, B, C has same date and sort order is applied to in the page load. The date field is order by asc in soql and sort order is also applied in datatable. But when I inline edit the close date it gets updated and when the page refresh still same field is order by asc and sort order applied(Chase Date), but the Record A, B, C is changed to different order like C, A, B though it has same date. I tried applying a secondary order by using Created date field. The problem again is data is uploaded through data loader and few records has same created date time stamp. Any suggestion?

enter image description here

  • It's not super clear what your end goal is, but you could try ORDER BY Chase_Date__c, CreatedDate, Id. – Adrian Larson May 10 '18 at 13:16
  • @AdrianLarson Thanks. I tried out applying the Id as secondary sort and it worked out – Vetriselvan Manoharan May 11 '18 at 5:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.