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
deepu.sandeepdeepu.sandeep 

Modified rows exist in the records collection!

Hi,

 

I need to dispaly a set of records in a page.

 

i've done this by using PageBlock table and standardsetcontroller.

 

i'm querying the list of contact records and passing the list to standardsetcontroller and assigning that standardsetcontroller reference to PB table.

 

Here i have one condition before sending the result set to standardsetcontroller i'm masking one field value

if(field1===true)

field2='***************';

 

I'm getting what i desired i.e. masking field value before it display, but i'm getting following exception.

 

How can i avoid this error "Modified rows exist in the records collection!"

 

Thanks,

Sandeep

NHKNHK

Hi,

 

You cannot modify the records of the collection which you are iterating. You can use a tempSet to hold the values and assign it back to the collection after iteration.

 

Best Regards,

NHK

deepu.sandeepdeepu.sandeep

Hi Kashyap,

 

Thanks for the reply, i'm not able to understand what you are trying to say. can you please explain me with some example.

 

 

NHKNHK
Can you please post your code?