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
Ganesh HembramGanesh Hembram 

Critical update

Hello Experts,

Anyone having any idea what is Critical update: “Predictable Iteration Order for Apex Unordered Collections”..?? what will happen if I activate this update, whether it will affect any data from database

Regards,
Ganesh
sandeep sankhlasandeep sankhla
Hi Ganesh,

Salesforce is changing the Apex implementation for unordered collections (maps and sets) to make the order of elements in those collections deterministic. With this update, the order of elements in maps and sets will be the same every time your code is run again. This update may cause a different iteration order for maps and sets than the current order. Once this change takes effect, any Apex code that exercises order-dependent logic on unordered collections may fail.


So it means any Apex code that exercises order-dependent logic on unordered collections may fail.

Thanks
Ganesh HembramGanesh Hembram
Thanks Sandeep but I have one doubt is that if i'll activate update then i've to change anything in my previous apex code.