Salesforce Exceptions

Exceptions come with the territory in Salesforce and it’s not always easy to determine their causes. This guide will help you troubleshoot the most commonly occurring Clearbit errors. Keep in mind that an admin is required to make most of the changes below.

 

Exception: INSUFFICIENT_ACCESS_OR_READONLY

The most common cause of this error is that the user triggering it does not have access to edit the record specified in the error.

Suggested fix

Typically, you can resolve this exception by simply adding the correct permissions to the user. Here's where to start:

  1. Check Clearbit Standard Permissions
    1. - head to Setup
    2. - type in the Quick Find Search Bar: Permission Set
    3. - click into Clearbit Standard Permissions
    4. - click into Manage Assignments  
    5. - select the user to grant permissions to
    6. - click Add Assigments to grant the user permissions
  2. Check Clearbit User Permissions
    1. - head to Setup
    2. - type in the Quick Find Search Bar: Permission Set
    3. - click  into Clearbit User Permissions
    4. - click into Manage Assignments  
    5. - select the user to grant permissions to
    6. - click Add Assigments to grant the user permissions
  3. If the previous two steps don’t resolve the issue, your user may not have permission to edit the lead/contact/account in question.
    1. - head to Setup
    2. - type in the Quick Find Search Bar: Profiles
    3. - click into Profiles
    4. - select the profile of the user triggering the exception
    5. Make sure both field level permissions and standard object permissions allow the user to edit the object in question.

 

Exception:  CANNOT_EXECUTE_FLOW_TRIGGER

This error typically occurs when a workflow isn't properly implemented. Most commonly when a flow is trying to request a field from an object that doesn’t exist.

Suggested fix

  1. Double check your processes in Process Builder
    1. -  head to Setup
    2. - type in the Quick Find Search Bar: Process Builder
    3. - check through the processes that are in place
    4. specifically, follow Step 3 closely to double check that the Criteria portion has referenced correctly and in the specified order
  2. Double check the workflows built with Workflow Rules
    1. head to Setup
    2. - type in the Quick Find Search Bar: Workflow Rules
    3. - check through all workflow rules that are in place that references cbit_Clearbit_r.cbit
    4. specifically, make sure to validate that cbit_Clearbit_r.cbit exists before referencing it in your workflows

 

Exception:  FIELD_CUSTOM_VALIDATION_EXCEPTION

The exception is thrown when a validation rule blocks a record from being automatically updated by clearbit.

Suggested Fix

  1. - click on Setup
  2. - type in the Quick Find Search Bar: Validation Rules
  3. - click into the Validation Rules under Leads
  4. - select the Validation Rule that is triggering the exception
  5. - If the exception is thrown by enrichment: add the following to the beginning of your formula:  cbit__ClearbitReady__c == True &&
  6. If the exception is thrown by prospector: add the following to the beginning of your formula:  cbit__CreatedByClearbit__c == False &&

 

Exception:  DUPLICATES_DETECTED

This exception is typically triggered when Salesforce is set to allow duplicate records to be created, but not to be edited. When Clearbit attempts to update the record, it is blocked from doing so.

Suggested Fix

  1. - click on Setup
  2. - type in the Quick Find Search Bar: Duplicate Rules
  3. - click into the Duplicate Rule that is throwing the exception
  4. - Make sure that Action on Edit is set to Allow with Alert is unchecked.

Note: This is essentially disables the duplicate rule on edit, which is the only way to reliable allow Clearbit to update the record. Alternatively, you can use the criteria at the bottom of the page to set the Rule to selectively run if ClearbitReady == True. This will allow clearbit to update the first time, while keeping the duplicate rule intact, but will block Clearbit from updating in the future.

 

Exception: FIELD_INTEGRITY_EXCEPTION

This exception is triggered when Clearbit tries to write to a picklist enabled field with a value that is not included on the picklist.

Suggested Fix

The error message will indicate which field is triggering the error. For address picklists, you can head to setup -> State and Country/Territory Picklists, for all others head to setup -> Fields and click on the field in question, then simply update the picklist to include any necessary values.

 

Exception: System.LimitException: CPU time limit exceeded

This exception is rarely caused by Clearbit as we don’t use many long running Apex jobs. That said, occasionally this exception will be caused by a process that is triggered by a Clearbit update. Feel free to contact us at support@clearbit.com if you have any questions.

 

Exception: ENTITY_IS_DELETED, System.NullPointerException and Duplicate id in list

These exceptions are rare and are all caused by internal Clearbit processes, and will fixed in future releases. We are automatically alerted when they occur, and you can safely ignore. If you have any questions feel free to reach out to support@clearbit.com.

 

Exception: UNABLE_TO_LOCK_ROW

This exception is triggered when Clearbit tries to save a record that is currently being edited by another package or user. In most cases this can be safely ignored, as Clearbit will update the record in a future enrichment.

Exception: "Create" Permission to Field "LeadSource" on Object "Contact" is not allowed for the current user.

This exception is most likely caused due to User Profile permissions not being set to allow for editing on the Field Level.

Suggested fix

1. Head to to Setup

  1. Build
  2. Customize
  3. Contacts
  4. Fields

2. Click on Lead Source

  1. View Field Accessibility
  2. Click on Editable for System Administrator
  3. Checking the first "Visible" checkbox for Field-Level Security turns it from Hidden to Editable, so that you are able to add Contacts successfully. Like this.

Make sure to also check that Clearbit Permission Sets have been set successfully.