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
SanalSanal 

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());
}
DevAngelDevAngel
Hi Sanal,

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?
SanalSanal
Hi dave,

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