You need to sign in to do that
Don't have an account?
Shin
Code:
This should work in Firefox 1.5 + and IE7.
IE6 with prototype.js is also OK (Array.prototype.map is defined).
Note that it deletes only up to 200 records (deleteIds maximum is 200...).
You can use this snippet sforce.debug.open() window or firebug.
One-liner AJAX Toolkit : Truncate SObject records
Code:
with(sforce.connection)deleteIds(query("SELECT Id FROM "+sobjectType).getArray('records').map(function(r){return r.Id}))
This should work in Firefox 1.5 + and IE7.
IE6 with prototype.js is also OK (Array.prototype.map is defined).
Note that it deletes only up to 200 records (deleteIds maximum is 200...).
You can use this snippet sforce.debug.open() window or firebug.
~ sfdcfox ~
Thanks!