Timeline for There is an implementation restriction on ActivityHistories
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 8, 2022 at 23:09 | comment | added | Olivia | Updating for future readers - unfortunately I just tested again with multiple tasks records with the same activitydate and lastmodified date but different createddates and the query is still not working with the three ORDER BY parameters while signed in as a non admin user. I must have initially tested with bad data | |
Sep 8, 2022 at 23:07 | comment | added | Olivia | I got it now. I wasn't thinking of it that way, thank you for explaining | |
Sep 8, 2022 at 22:02 | comment | added | cropredy | Because the entire OP sort is all fields DESC, sorting on one field DESC is equivalent. If you were sorting on field 1 desc, field 2 ASC, field 3 DESC - my approach would not work | |
Sep 8, 2022 at 20:27 | comment | added | Olivia | if we are setting the Sortable_Activity_LastMod_CreatedDate__c field to have a single string value (even if it is separated by dashes or colons) I don't understand how ORDER BY would be able to read each value and know how to split them out by the dash or colon. It seems like the query would order by a single value....I can ask this in a new question if this is getting too into the weeds. | |
Sep 6, 2022 at 20:45 | comment | added | cropredy |
no - it is ORDER BY 1632441600-1632522839-1632522839 as a single string. I used the dash merely to make the concatenated string easier to read. I could have used a colon : or an emoji or dispensed with it entirely
|
|
Sep 6, 2022 at 19:39 | vote | accept | Olivia | ||
Sep 6, 2022 at 19:39 | comment | added | Olivia | This makes sense and I just tried running it and it works, thank you. I am curious about how the ORDER BY can look at three values separated by a dash. Is this how it is compiled with three separate values? I was under the impression that when it compiles the query runs something like "ORDER BY 1632441600 AND ORDER BY 1632522839 AND ORDER BY 1632522839". Just curious as to how it is working on the backend | |
Sep 6, 2022 at 4:17 | comment | added | cropredy | it is a string that can be sorted DESC, it will sort ActivityDate DESC, if any dups, then will sort LastModifiedDate DESC, if dups then finally sort CreatedDate DESC | |
Sep 4, 2022 at 1:53 | comment | added | Olivia | How does this take into consideration DESC? | |
Sep 3, 2022 at 0:03 | history | answered | cropredy | CC BY-SA 4.0 |