You need to sign in to do that
Don't have an account?
jf317820
error handling and empty queries
I'm running a number of queries, but when one of them returns a null data set, it's prematurely terminating my script...am i missing something here...how can i move on with my script after the error is handled? thanks in advance.
try {
sforce.connection.query(....);
}catch(error) {
//something went worng but ignore it for now
}
If you are using a asycn style call, you can provide an error handler, something like:
var callback = {onSuccess: handleSuccess, onFailure: handleFailure};
sforce.connection.query("select ..", callback);
function handleFailure(error) {
//ignore
}