You need to sign in to do that
Don't have an account?
Sikander Iqbal
Custom Javascript Button not working in Sandbox???
Hello All,
I am trying to test run a nintex app (DocGen/Drawloop) and it works fine in production but I cannot get it to run without an error in sandbox.
Nintex customer service told me the following when I shared the errors with them:
"For the newest error you provided, that is actually a Salesforce error. This is what our Error Browser mentions: Unable to serialize property of 'records' on type common.api.soap.wsdl.QueryResult Error Id: 821496744-32366 (816038562). You will need to reach out to Salesforce to confirm what exactly is occurring."
Here is the code I am using for the button (it's exactly the same as the production Org) and showing No Syntax Error:
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")}
//GRABS THE IDS FROM THE LIST VIEW
var selectedIds = {!GETRECORDIDS($ObjectType.Candidacy__c)};
// CREATES AN ARRAY
var records = [];
// INCREMENTALLY LOOPS THROUGH THE ARRAY WHILE CHECKING A CHECKBOX CALLED RUN DDP NEXTGEN
for (var i = 0; i < selectedIds.length; i++) {
var record = new sforce.SObject("Candidacy__c");
record.Id = selectedIds[i];
// If this field is not a checkbox, the value (1) will also need to change.
record.RUN_DDP_NEXTGEN__c = 1
records.push(record);
}
// ERROR CHECKING
try
{
var update = sforce.connection.update(records);
if (update && update[0] && update[0].errors && update[0].errors.message)
alert(update[0].errors.message);
else
alert('Your request'+(records.length == 1 ? ' is' : 's are')+' being processed.');
}
catch (err)
{
alert('An error has occurred. Please try again. '+err);
}
Any help would be greatly appreciated.
Thanks,
I am trying to test run a nintex app (DocGen/Drawloop) and it works fine in production but I cannot get it to run without an error in sandbox.
Nintex customer service told me the following when I shared the errors with them:
"For the newest error you provided, that is actually a Salesforce error. This is what our Error Browser mentions: Unable to serialize property of 'records' on type common.api.soap.wsdl.QueryResult Error Id: 821496744-32366 (816038562). You will need to reach out to Salesforce to confirm what exactly is occurring."
Here is the code I am using for the button (it's exactly the same as the production Org) and showing No Syntax Error:
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")}
//GRABS THE IDS FROM THE LIST VIEW
var selectedIds = {!GETRECORDIDS($ObjectType.Candidacy__c)};
// CREATES AN ARRAY
var records = [];
// INCREMENTALLY LOOPS THROUGH THE ARRAY WHILE CHECKING A CHECKBOX CALLED RUN DDP NEXTGEN
for (var i = 0; i < selectedIds.length; i++) {
var record = new sforce.SObject("Candidacy__c");
record.Id = selectedIds[i];
// If this field is not a checkbox, the value (1) will also need to change.
record.RUN_DDP_NEXTGEN__c = 1
records.push(record);
}
// ERROR CHECKING
try
{
var update = sforce.connection.update(records);
if (update && update[0] && update[0].errors && update[0].errors.message)
alert(update[0].errors.message);
else
alert('Your request'+(records.length == 1 ? ' is' : 's are')+' being processed.');
}
catch (err)
{
alert('An error has occurred. Please try again. '+err);
}
Any help would be greatly appreciated.
Thanks,
Seems like you have hit an Internal Salesforce Error. You can see the GACK ID in the error message - 821496744-32366 (816038562).
I think your best bet will be to reach out to Salesforce for more help.
Thanks,
Shruti