Print this page

Why are we getting an error message " System.DmlException: Insert failed" every time we convert a lead ?

Knowledge Article Number 000005368

Error when converting a lead:

Error: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [CE / WFD Description]: [CE / WFD Description] (System Code) External entry point.


This means that there is a required field in Accounts, Contacts, Opportunities, or an Existing Task associated to the Lead that is not being populated.

Accounts, Contacts, and Opportunities this is due to a value not being mapped to a required Field during the lead conversion process. To resolve this, a system administrator will need to create a lead field and setup field mapping to map this field to the relevant required Account ,Contact or Opportunity field.

More information about this configuration can be found here : Mapping Custom Lead Fields

For Tasks associated with the Lead, a Task Id will be included in the Error message:

Error: System.DmlException: Update failed. First exception on row 0 with id 00TD000000rphthMAA; first error: REQUIRED_FIELD_MISSING, Required fields are missing:

To resolve the issue with Tasks, ensure that Required Fields are populated on ALL Tasks associated with the Lead.
Also, please note there's a Known Issue that can create a similar error message: Unable to convert Lead with recurring task.

Below is the workaround:

On the default fields besides the lead field mapping, the following (depends on the business case):

1) Add a default value on the required field. On the default value a validation rule can be built, that fires when the record is not new, but when it is edited to enforce changes on the field.

2) Disable "Require Validation for Converted Leads Checked" under Click Setup | Customize | Lead settings.

promote demote