I am creating some records in my controller but some of them might fail during insert due to duplication, so I use
It works just fine and ignores records that already exist. But when I use
<apex:pageMessages /> in my page, it tells me:
Error: Error while inserting/updating My SObject: Duplicate Entry!
So apex skips the errors, but they are still existing in the execution context, so they are displayed in VF. Any Idea how to keep the insert(x, false) but also use pageMessages? I'm trying to avoid an extra query doublechecking duplicated records.