Upgraded to 7.1.4 - Now my leads won't save! - Database failure. Please refer to sugarcrm.log for details.

So I upgraded suitecrm to 7.1.4 to fix a scheduler problem (which still didn’t help) and now I can’t save my leads. Any lead I try and save I get this error or something similar to it:

Wed Nov 19 13:27:14 2014 [28214][c0afbc9b-b7f5-6fcf-2899-52f3c6e1be20][FATAL] Error updating table: leads: Query Failed: UPDATE leads
SET date_modified=‘2014-11-19 20:27:14’,modified_user_id=‘c0afbc9b-b7f5-6fcf-2899-52f3c6e1be20’,created_by=‘1’,description=‘Party Buses - 80 Pass Party Bus’,assigned_user_id=‘c0afbc9b-b7f5-6fcf-2899-52f3c6e1be20’,salutation=NULL,first_name=NULL,last_name=‘Steven’,title=NULL,department=NULL,do_not_call=0,phone_home=NULL,phone_mobile=‘410-972-7034’,phone_work=NULL,phone_other=NULL,phone_fax=NULL,primary_address_street=NULL,primary_address_city=NULL,primary_address_state=NULL,primary_address_postalcode=NULL,primary_address_country=NULL,alt_address_street=NULL,alt_address_city=NULL,alt_address_state=NULL,alt_address_postalcode=NULL,alt_address_country=NULL,assistant=NULL,assistant_phone=NULL,converted=0,refered_by=NULL,lead_source=NULL,lead_source_description=NULL,status=‘Recycled’,status_description=NULL,reports_to_id=’’,account_name=NULL,account_description=NULL,contact_id=’’,account_id=’’,opportunity_id=’’,opportunity_name=NULL,opportunity_amount=NULL,campaign_id=’’,birthdate=NULL,portal_name=NULL,portal_app=NULL,website=NULL,=NULL
WHERE leads.id = ‘625741e7-78de-fb5a-ad4c-546a62c36d8b’ AND deleted=0: MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘=NULL
WHERE leads.id = ‘625741e7-78de-fb5a-ad4c-546a62c36d8b’ AND deleted’ at line 2

I understand its a problem with the database or tables, but not sure where to start. I am running a apache/linux based system with cpannel if that helps?

[size=5]FIXXED![/size]

So what I learned on my 2 day journey of this problem is that there is an extra null field in the admin > studio > leads > fields area.
I think the next update needs a bug fix for this to remove it right from studio. But here is the fix:

Go into admin > studio > leads (or whatever is causing your null field) and at the top left corner click the reset module button!

Voila!

[color=#ff0000]NOTE**** be sure to uncheck all your custom fields or the most likely will be deleted! ( I didn’t try it to find out! )[/color]

Hope this saves someone HOURS of HEADACHE! :woohoo:

1 Like