I have the following requirement:

When a user clicks "create and ignore warning" when creating a record and thereby overrules the duplicate management, I need to have a list of these records which were created even though there was a warning.

Is there some way to do this?

If I knew how to check that there was a warning and he ignored it, I would then set a checkbox "CreatedByIgnoringWarning" or something to true and then I have my list already. But I don't know how I would go about the check.


You can select the option 'Report' when configuring your duplicate rule. Create a custom report type to show duplicate records.

Check this link for more information: https://help.salesforce.com/apex/HTViewHelpDoc?id=duplicate_management_custom_report_types.htm&language=en_US

In apex, you can catch duplicate records while inserting if the DML throws Database.DuplicateError, you can then set your checkbox 'CreatedByIgnoringWarning' on the record and update it.

  • Awesome! Thank your very much. – Frederik Witte Apr 21 '16 at 8:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.