+ Start a Discussion
Salesforce DeveloperSalesforce Developer 

Modified rows exist in the records collection!

Hi All, 

Need Help ! I have a requirement where I have to implement a search functionality. On enter a particular term it will search records and then return results. Also I have to add a "No item found" Option in a list of records. I have used StandardSetController for this , but when I try to add a dummy record named " No Item Found " in the List and then pass the list to the instance of StandardSetController, I am getting error "Modified rows exist in the records collection!" on the VF page. I understand the meaning of the error but can anybody suggest me how should this can be accomplished.

Thanks in advance !
Please review the below posts to resolve this

Salesforce DeveloperSalesforce Developer
Thanks for information Ramu_SFDC, I have gone through these links already but I am looking for any idea through which I can add "No item found" in the list passed to the standardsetController. 
Michael PaulsonMichael Paulson
Any luck in resolving this? I have a similar issue and don't want to save anything to the database.
Salesforce DeveloperSalesforce Developer
It didn't work, as far as I remeber I ended up using another output panel and showing the No Result found message if the list was empty.