Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Duplicate Rules: Unable to Create No Contact Record

The Duplicate Rules are typically setup to prevent duplicate contacts from being created. Typically, clients will have this setup for their contact record.

In some instances the following concern can occur when there is a No Contact Record in use. Specifically when you are sending an email to a contact that does not exist and using the No Contact Record during contract creation you may see an error like “Duplicate contact cannot be created”. A simple fix is to delete the existing No Contact record, however in the case this is not preferred. You can set up a Duplicate Rule for the No Contact Record to be ignored.

Instructions

Follow these instructions to create a Duplicate Rule for the No Contact Record to be ignored during contact creation:

  1. Go to Setup

  2. Then, Duplicate Rules

  3. Select Duplicate Rules for Contact records.

  4. You can create a condition like: Lastname | not equal to | No Contact Record

Validation Rules: Unable to Create No Contact Record

If your org has validation rules that require other Contact fields, S-Docs can't create the No Contact Record and the email fails. S-Docs creates this temporary Contact when you email an address that isn't on any Contact, then deletes it after sending. Use one of these options.

Option 1 (Recommended): Apex Trigger

Create a before insert, before update trigger on Contact that fills the fields your validation rules require. The email is sent and logged in Activity History on the base record.

trigger ContactFirstName on Contact (before insert, before update) {
    for (Contact c : trigger.new) {
        if (c.LastName == 'No Contact Record') {
            c.This_Cannot_Be_Null__c = 'some non-null value';
        }
    }
}

Test class, if you need coverage:

Option 2 (Not Recommended): Create the Record Manually

Create a Contact with Last Name No Contact Record and Email this.email@is.invalid, plus every field your validation rules require. First Name is optional (S-Docs is suggested). Then add useExistingNoContactRecord='true' to your S-Docs button URL:

Last updated

Was this helpful?