You need to sign in to do that
Don't have an account?

JavaScript Error "log is not defined" while trying sforce.debug.log
I am trying the following code in an OnClick SControl
and I am getting a browser error which says "log is not defined"
When I use Firebug to inspect connections.js I see the following code ...
I am confused. Shouldn't this be working? This stopped working in an old SControl I built, so I am sure something has changed.
Any help would be appreciated
John
Code:
{!requireScript("/soap/ajax/11.1/connection.js")} sforce.debug.trace = true; sforce.debug.log("Hello World");
and I am getting a browser error which says "log is not defined"
When I use Firebug to inspect connections.js I see the following code ...
Code:
sforce.internal.Debug = function() { ... this.log = function(str) { this.println(str, "print"); } sforce.debug = new sforce.internal.Debug();
I am confused. Shouldn't this be working? This stopped working in an old SControl I built, so I am sure something has changed.
Any help would be appreciated
John
User Console.log('Value')
function callscript() {
var result = sforce.connection.queryAll("Select Name, Id from Account");
var records = result.getArray("records");
for (var i=0; i<records.length; i++) {
var record = records[i];
console.log(record.Name + " -- " + record.Id);
}
}