jen
01/19/2023, 11:06 PMfunction goToSuitelet(context) {
var script_id = parseInt(runtime.getCurrentScript().getParameter('custscript_go_to_suitelet_script_id'));
var deployment_id = parseInt(runtime.getCurrentScript().getParameter('custscript_go_to_suitelet_deployment_id'));
var deployment_id = 1;
var params = {txid: context.newRecord.id};
redirect.toSuitelet({scriptId: script_id, deploymentId: deployment_id, parameters: params});
}
I had to change the last line to
redirect.toSuitelet({scriptId: String(script_id), deploymentId: String(deployment_id), parameters: params});
jen
01/19/2023, 11:06 PMjen
01/19/2023, 11:06 PMAccount: xxxxxx
Environment: Production
Date & Time: 01/19/2023 02:27 pm
Execution Time: 0.00s
Script Usage: 0
Script: Go To Suitelet
Type: Workflow Action
Function: onAction
Error: INVALID_ID
You have provided an invalid script id or internal id: 3312.0
jen
01/19/2023, 11:07 PMNElliott
01/20/2023, 10:45 AMdennysutanto
01/20/2023, 11:25 AMreptar
01/20/2023, 4:18 PMparseInt()
?jen
01/20/2023, 4:47 PMreptar
01/20/2023, 4:50 PMjen
01/20/2023, 5:03 PMString()
which forces it to be "3312"
instead of just 3312
.jen
01/20/2023, 5:03 PMjen
01/20/2023, 5:04 PM"3312.0"
for no good reasonjen
01/20/2023, 5:04 PMjen
01/20/2023, 5:04 PMreptar
01/20/2023, 5:05 PMjen
01/20/2023, 5:05 PMjen
01/20/2023, 5:05 PMjen
01/20/2023, 5:05 PMjen
01/20/2023, 5:06 PM