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
David DanzigDavid Danzig 

Automated Lead Inserts Failing

We've been having trouble with lead inserts both via VisualForce pages andvia Web-to-Lead. Here is the error email of the first failed Lead insert of this type.

Please help! This is a huge problem and we havene't found a solution other than removing the most important fields from our forms, including Email address.


From: support@emea.salesforce.com <support@emea.salesforce.com>
Date: Sat, Jul 19, 2014 at 11:50 AM
Subject: Salesforce Could Not Create This Lead
To: ""

Salesforce could not create this lead because of the reason listed below. We will try creating the lead again. For more information about this error or help with Web-to-Lead, please contact Customer Support.

Reason: Your Lead could not be processed.
common.exception.SfdcSqlException: ORA-20025:
ORA-06512: at "HAPPY.CACCESS", line 2258
ORA-06512: at "HAPPY.CACCESS", line 579
ORA-06512: at "HAPPY.CACCESS", line 650
ORA-06512: at "HAPPY.CTASK", line 565
ORA-06512: at line 1


{call cTask.insert_tasks(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}

{call cTask.insert_tasks(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
    Lead Capture Page: http://www.zzz.php

Record Information:

<LIST OF FIELDS>

To incorporate this lead into salesforce.com you can key in the data above.

If you have any questions, please click on Support at the top right of any page within salesforce.com.

Customer Support
salesforce.com
RadnipRadnip
Do you have any custom code in on the lead object? any triggers etc? or any packages?
David DanzigDavid Danzig
Yes. We have a lot and it would be very hard to untangle without knowing directly what to look for. Is there any way to interpret these error codes? Is there somewhere I can look to find oout what they mean?  Also, I've checked the Setup Audit Trail and no changes were made that seem to be connected to this - i.e., not on Lead, Contact, Task, important Profiles, etc.  Were there any updates to SF by the company in mid-July that might have affected us?
Marsilio GabuardiMarsilio Gabuardi
User-added imagei have added this trigger, and it works if i create a new lead and check the autoconvert box. but when the lead comes from web-to-lead form, it gives me  

Reason: Your Lead could not be processed.
common.exception.SfdcSqlException: ORA-20025:
ORA-06512: at "HAPPY.CACCESS", line 2258
ORA-06512: at "HAPPY.CACCESS", line 579
ORA-06512: at "HAPPY.CACCESS", line 650
ORA-06512: at "HAPPY.CTASK", line 565
ORA-06512: at line 1

i don't know what else to do. 
Vinay Vernekar 24Vinay Vernekar 24
Hi,

This is the issue since long time. I had a requirement to convert the lead when it comed via web to lead form. This error occurs when lead comes via web-to-lead form and you have a trigger to convert the lead on insert of lead. I tried to move the logic into future method, but convert method not working in future method as it says "Future method cannot be called from another future or batch", I guess convert method is itself batch and due to which its not allowed. Then I tried Queable method, but the issue remains the same.

Finally the solution for this is to delay conversion of lead either via time based workflow, process builder flow or scheduled class. Built a formula field which is basically 2 mins after the creation on lead. So using process builder, I had updated a field on lead (2 mins after created date). On update of field, trigger called to convert the lead.

Thanks,
Vinay Vernekar
https://sfdcdevelopers.com/Author
David Catindoy 101David Catindoy 101
Have you managed to solve this?