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
Salesforce  Report IssueSalesforce Report Issue 

salesforce list of custom objects inserted is not in order in the list - Very Urgent !!!!!!!!!!

Hi All ,

I am facing issue with upsert operation .

 

I am inserting the List of records in sorted order into the custom Object , from the Custom Object I am showing into the report  in the Sorting order as they insert .

 

But If I am trying to Display in the report its not coming in the same order and also not inserted in to the same order in the custom object  as shown in below logs

 

The List is having the Below Sort Order . But My report is Not displaying in the same order . (I can't sort here based on any key  in report ... Need to be display based on inserted order )

================

12:33:29.433 (1433156000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011148181640
12:33:29.433 (1433249000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011148193232
12:33:29.433 (1433342000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011148197141
12:33:29.433 (1433437000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011148494760
12:33:29.433 (1433530000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011149180121
12:33:29.433 (1433632000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011149180132
12:33:29.433 (1433726000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011149180140
12:33:29.433 (1433819000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011156490617
12:33:29.433 (1433917000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011156490621
12:33:29.434 (1434010000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011156490640
12:33:29.434 (1434106000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011156490660
12:33:29.434 (1434199000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011158002320
12:33:29.434 (1434292000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011158105260
12:33:29.434 (1434387000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011159159721
12:33:29.434 (1434479000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011159449916
12:33:29.434 (1434573000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011166193217
12:33:29.434 (1434674000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011166193232
12:33:29.434 (1434769000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011192463217
12:33:29.434 (1434866000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011192464021
12:33:29.434 (1434961000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011302401340
12:33:29.435 (1435058000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011316000124
12:33:29.435 (1435153000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011316000140
12:33:29.435 (1435247000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011317188840
12:33:29.435 (1435340000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011317188860
12:33:29.435 (1435435000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011317400516
12:33:29.435 (1435527000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011317400562
12:33:29.435 (1435630000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011321002421
12:33:29.435 (1435724000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011321106520
12:33:29.435 (1435817000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011321188717
12:33:29.435 (1435915000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011321188740
12:33:29.436 (1436008000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011321400117
12:33:29.436 (1436104000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011321481017
12:33:29.436 (1436197000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011321481217
12:33:29.436 (1436289000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011321490916
12:33:29.436 (1436386000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011321490921
12:33:29.436 (1436479000)|USER_DEBUG|[337]|DEBUG|sortedListOfKeys====>>>00011321490940

 

===============

 

 

Please suggest me to fix the issue .

ministe_2003ministe_2003

how do you plan on sorting based on when they were inserted?  Best solution as far as I can see is to add a field to your custom object which you can sort on.  Either an autonumber which would work if they're all sorted in order because the autonumber would increment one by one, or just a number field and you can give the records a value in this field before you insert them