You need to sign in to do that
Don't have an account?
Maxxum
AJAX Toolkit - Getting Error - Error: responseDOM has no properties
Error: responseDOM has no properties
Source File: https://www.sforce.com/ajax/beta1/soapobjects.js
Line: 692
Here is my code snippet that tried to retrieve a record from custom app, changes some fields and then updates it back. Error is thrown when update is called.
//Save decision in the table and load credit application page...
alert('');
var qr = sforceClient.Query("Select Address_1__c, Address_2__c, Address_3__c, Amount_Requested__c, Application_Refe
rence__c, Approved_Credit_Line_Amount__c, Business_Registration_Num__c, Business_Started__c, City__c, Country__c, CreatedById, CreatedDate, Credit_Line_Amo
unt__c, Credit_Line_Approval_Date__c, Credit_Line_Approved_On__c, Credit_Line_Currency__c, Credit_Line_Effective_Date__c, Credit_Request_Type__c, Date_Scor
ed__c, Decision__c, Decision_Comments__c, Decision_Contact_Name__c, Decision_Contact_Phone__c, Decision_External_Transaction_Number__c, DecisionState__c, D
ecisionStatus__c, Doing_Business_As__c, Duns__c, Email__c, Experian_File__c, Fax__c, Federal_Tax_Id__c, Id, LastModifiedById, LastModifiedDate, LegalName__
c, Name, OwnerId, Phone__c, Product_Name__c, Reason_1__c, Reason_2__c, Reason_3__c, Reason_4__c, Reason_5__c, Score__c, Score_card__c, State__c, SystemMods
tamp, Term__c, Ticker__c, Zip_Postal_Code__c from CreditApplication__c where id = ''");
if (qr.size != 1)
{
document.getElementById("error_div").innerHTML = "Error occured while retrieving credit application details. Credit application decision may not be available. Please try again later.";
}
else
{
qr.records[0].set("Date_Scored__c", "");
qr.records[0].set("Decision__c", "");
qr.records[0].set("Decision_Comments__c", "");
qr.records[0].set("DecisionState__c", "");
qr.records[0].set("DecisionStatus__c", "");
qr.records[0].set("Reason_1__c", "");
qr.records[0].set("Reason_2__c", "");
qr.records[0].set("Reason_3__c", "");
qr.records[0].set("Reason_4__c", "");
qr.records[0].set("Reason_5__c", "");
qr.records[0].set("Score__c", "");
qr.records[0].set("Score_card__c", "");
var saveResult = sforceClient.update(qr.records);
window.location = "https://na1.salesforce.com/";
}
ANY IDEA WHY THIS IS HAPPENIG?
Source File: https://www.sforce.com/ajax/beta1/soapobjects.js
Line: 692
Here is my code snippet that tried to retrieve a record from custom app, changes some fields and then updates it back. Error is thrown when update is called.
//Save decision in the table and load credit application page...
alert('');
var qr = sforceClient.Query("Select Address_1__c, Address_2__c, Address_3__c, Amount_Requested__c, Application_Refe
rence__c, Approved_Credit_Line_Amount__c, Business_Registration_Num__c, Business_Started__c, City__c, Country__c, CreatedById, CreatedDate, Credit_Line_Amo
unt__c, Credit_Line_Approval_Date__c, Credit_Line_Approved_On__c, Credit_Line_Currency__c, Credit_Line_Effective_Date__c, Credit_Request_Type__c, Date_Scor
ed__c, Decision__c, Decision_Comments__c, Decision_Contact_Name__c, Decision_Contact_Phone__c, Decision_External_Transaction_Number__c, DecisionState__c, D
ecisionStatus__c, Doing_Business_As__c, Duns__c, Email__c, Experian_File__c, Fax__c, Federal_Tax_Id__c, Id, LastModifiedById, LastModifiedDate, LegalName__
c, Name, OwnerId, Phone__c, Product_Name__c, Reason_1__c, Reason_2__c, Reason_3__c, Reason_4__c, Reason_5__c, Score__c, Score_card__c, State__c, SystemMods
tamp, Term__c, Ticker__c, Zip_Postal_Code__c from CreditApplication__c where id = ''");
if (qr.size != 1)
{
document.getElementById("error_div").innerHTML = "Error occured while retrieving credit application details. Credit application decision may not be available. Please try again later.";
}
else
{
qr.records[0].set("Date_Scored__c", "");
qr.records[0].set("Decision__c", "");
qr.records[0].set("Decision_Comments__c", "");
qr.records[0].set("DecisionState__c", "");
qr.records[0].set("DecisionStatus__c", "");
qr.records[0].set("Reason_1__c", "");
qr.records[0].set("Reason_2__c", "");
qr.records[0].set("Reason_3__c", "");
qr.records[0].set("Reason_4__c", "");
qr.records[0].set("Reason_5__c", "");
qr.records[0].set("Score__c", "");
qr.records[0].set("Score_card__c", "");
var saveResult = sforceClient.update(qr.records);
window.location = "https://na1.salesforce.com/";
}
ANY IDEA WHY THIS IS HAPPENIG?
Hi Maxxum,
To see what is going on with the request and response, you add a div to your scontrol. In the onload event for the body you can make the following call:
sforceClient.setMessageLog(document.getElementById("id_of_your_div");
Every api call will now be logged to that div. Try the sample below:
Message Edited by DevAngel on 08-15-2005 04:00 PM
The html for the previous message is attached.
If you get a security warning, add forums.sforce.com to your trusted sites.
Message Edited by DevAngel on 08-15-2005 02:59 PM
Thanks for your response.
I am getting
Error: xmlDoc.loadXML is not a function
Source File: https://www.sforce.com/ajax/beta1/sforceclient.js
Line: 149
error when I add the code suggested by you.
Any idea why?
-Rajan
The error:
I am getting
Error: xmlDoc.loadXML is not a function
Source File: https://www.sforce.com/ajax/beta1/sforceclient.js
Line: 149
is in Firefox.
Your suggested code works in IE.
But my original problem still exists.
Thanks for your help.
-Rajan
Oh, this won't work from this site on firefox due to browser security unless run in an scontrol.
Message Edited by DevAngel on 08-15-2005 05:06 PM