function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Owen DaweOwen Dawe 

Error: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Lead Source]: [Lead Source] (System Code)

I keep getting this message when i go to convert lead to account,,,,
Error: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Lead Source]: [Lead Source] (System Code)
RAM AnisettiRAM Anisetti
Hi,

You have to look for Lead Source  field mandatory or not only in following objects

Account
Contact
Opportunity


If the field is manadatory then do follow

1.You need to map Lead Source field.
   For that go to Your Name | Setup | Customize | Leads | Fields

2.remove validations for Lead Source field and try to convert



 
Santosh Kumar Sriram_2310Santosh Kumar Sriram_2310
Hi Owen,

The lead source is a mandatory field on the lead object. I am assuming that there are some workflows/process builder/APEX changing the value to NULL. The lead gets updated (a soft update) when you convert and when this happens, it is requiring the lead source to update the record.

Check the workflow field update
Check the update triggers
Check if you have process builder

Hope this helps!

Note: If you think this is the right/best answer kindly set this as the best option. Also if this helps you find the solution, do like (click on thumbs up) icon!
 
Owen DaweOwen Dawe
Hi Ram No help as there are no validation rules for lead source
Beer NutthawanBeer Nutthawan
Hi Owen 

While converting the Lead, you can look at the field "Lead Source" in Lead object as picture below: 
this field will automatically map with "Lead Source" in Opportunity object.

User-added image

And I guess that while you converting a Lead to Account it will also create a new Opportunity as well, that's is why the 
error is showing the field "Lead Source" is missing. So, please check: 

1. The field "Lead Source" in Opportunity if it has been marked as required field or not.
2. You can check your Trigger in Opportunity at action before insert, if there is any code set the field "Lead Source" to be null or not

Hope this helps!! 

Nutthawan.Beer