Scenario:
When a suitelet script calls another suitelet script or a client script with the link from url.resolveScript() method, we face an issue ‘Notice: Invalid Page Parameter’.
Solution:
This error occurs because we did not give the option ‘returnExternalUrl: true’ in the url.resolveScript()method. Without the ‘returnExternalUrl: true’ option, the method generates the internal URL of the script and hence we will not be able to use that link if we are using the suitelet script through its external URL.
Example:
let suiteletUrl = url.resolveScript({
scriptId: ‘customscript_jj_sl_taskid’,
deploymentId: ‘customdeploy_jj_sl_taskid’,
params: { ‘internalid’: internalId },
returnExternalUrl: true
});