You need to sign in to do that
Don't have an account?
Sanal
DynaBean object creation problem.
I'm trying to insert new record to my Customer Object that throws me an error saying "Invalid Procedure call or argument" ("Unspecified error" when tried with beta2 of dynalib.js) . I'm a beginner in this arena. please help!
here is the code that i'm using....
....
....
....
function addData() {
var Cust;
try {
Cust = new DynaBean("Customer__c");//error is thrown in this line
}
catch (e) {
alert(e + " - " + e.message);
}
alert("before Set");
Cust.set("Name","DynaBean Name");
Cust.set("Customer_Address__c","DynaBean Address");
Cust.set("Phone_Number__c","0998765432");
Cust.set("product_interested__c","Dyna Beans");
alert("Before Create");
var sr = sforceClient.Create([Cust]); // i tried (Cust)[0] also.
alert("Save Result:" + sr.toString());
}
here is the code that i'm using....
....
....
....
function addData() {
var Cust;
try {
Cust = new DynaBean("Customer__c");//error is thrown in this line
}
catch (e) {
alert(e + " - " + e.message);
}
alert("before Set");
Cust.set("Name","DynaBean Name");
Cust.set("Customer_Address__c","DynaBean Address");
Cust.set("Phone_Number__c","0998765432");
Cust.set("product_interested__c","Dyna Beans");
alert("Before Create");
var sr = sforceClient.Create([Cust]); // i tried (Cust)[0] also.
alert("Save Result:" + sr.toString());
}
Make sure that you have logged in to salesforce or are passing merge fields for server url and session id. Are you trying to run this page from the file system, a web server or from an scontrol?
I figured it out that it was due to improper login status. Solved the problem with the help of your tip.
Thanks!
Sanal
http://www.sanalks.com
Message Edited by Sanal on 03-08-2007 05:25 AM