You need to sign in to do that
Don't have an account?
Error creating a Lead record
Here is my debugging output :-
Insert : Field = Company | Value = qasem, muhannad
Insert : Field = LeadSource | Value = iKaptivate
Insert : Field = inq_type__c | Value = application
Insert : Field = iKap_Status__c | Value = iKaptivate Saved
Insert : Field = iKap_Last_Modified_Date__c | Value = 12/20/2004 15:35 PM
Insert : Field = iKap_Start_Date__c | Value = 12/20/2004 15:27 PM
Insert : Field = DeL_Employer__c | Value = red lobster
Insert : Field = Alternate_Phone__c | Value = 111111111
Insert : Field = PostalCode | Value = 19111
Insert : Field = City | Value = philadelphia
Insert : Field = BirthDate__c | Value = 09/18/0987
Insert : Field = Email | Value = email@cs.com
Insert : Field = SSN__c | Value = 111111111
Insert : Field = Phone | Value = 215678890
Insert : Field = FirstName | Value = muhannad
Insert : Field = Street | Value = xxxxxxxxxxxxxxxxx
Insert : Field = LastName | Value = qasem
Insert : Field = State | Value = PA
Insert : Field = Country | Value = USA
Insert : Field = Citizenship__c | Value = Yes
Insert : Field = Gender__c | Value = Male
Insert : Field = ikap_applicant_id__c | Value = 493137
Insert : Field = program__c | Value = Bachelor of Science in Computing Technology
Insert : Field = degree_level__c | Value = Undergraduate
Insert : Field = du_college__c | Value = U
Insert : Field = ikap_application_id__c | Value = 202592
Insert : Field = ikap_this_app_id__c | Value = 445045
Creating muhannad qasem, ThisAppID : 445045 record in SalesForce...
Done with muhannad qasem, ThisAppID : 445045 record in SalesForce
Here is the code that generates this output :-
Set sobj = p_sfdc.CreateObject(p_strCurrentObjectName)
FOR EACH strField IN dictNewFieldValues
strValue = dictNewFieldValues(strField)
'Response.Write("Before : Field = " & strField & " | Value = " & strValue & "<br>")
SELECT CASE UCASE(strField)
CASE "APPLICATION_STARTDATE__C"
CASE ELSE
strValue = dictNewFieldValues(strField)
IF LEN(strValue) > 0 Then
Response.Write("Insert : Field = " & strField & " | Value = " & strValue & "<br>")
sobj.Item(CSTR(strField)).Value = strValue
ELSE
SELECT CASE UCASE(strField)
CASE "LASTNAME", "FIRSTNAME"
'Response.Write UCASE(strField) & "<br>"
sobj.Item(CSTR(strField)).Value = "N/A"
END SELECT
END IF
END SELECT
NEXT
'sobj.Item("FirstName").Value = "Garry"
'sobj.Item("LastName").Value = "Lindsay"
Response.Write("Creating <b> " & strFullName & "</b>, ThisAppID : <b>"& ThisAppID & "</b> record in SalesForce...<br>")
Response.Flush
sobj.Create
sobj.Refresh
'p_sfdc.Create sobj, False
If Err.Number <> 0 Then
mIntError = Err.Number
mStrError = "Error: " & Err.Number & " Source: clssForceHelper.asp : CreatesForceRecord : " & Err.Description
Response.Write("<span class=""red_error_message_text"">"&mStrError&"</span><br>")
Response.Flush
bRet = FALSE
Else
'bRet = updateFlatFileDownloadState(dictState, dictNewFieldValues.Item("ikap_applicant_id__c"))
bRet = TRUE
End If
'Err.Raise vbObjectError + 93, "clssForceHelper.asp", "Error text"
Set sobj = NOTHING
The problem is that this seems to be data related, i.e. it only happens when certain values are passed in for a certain record!
Any Help?
Cheers
Garry
This particular record would fail because the birthdate is an invalid date, or the lead is really old. :-)
BirthDate__c | Value = 09/18/0987
That was it, sharp eyes, thanks alot!
I just wish the office COM object gave a much better error report, when it fails :-)
Cheers
Garry