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 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 !
Ramu_SFDCRamu_SFDC
Please review the below posts to resolve this

https://developer.salesforce.com/forums?id=906F000000095YxIAI
https://success.salesforce.com/issues_view?id=a1p30000000Sy4TAAS
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.