Charan
11/13/2024, 7:27 AMCeligo AI
11/13/2024, 7:27 AMAI generated answer (using internal Slack threads):To access the secret keys in the Map/Reduce script that are created in the UI, you need to use the
runtime.getCurrentScript()
method to get the current script object and then use the getParameter
method to get the value of the script parameter.
Here is an example:
javascript
var scriptObj = runtime.getCurrentScript();
var secretKey = scriptObj.getParameter({name: 'custscript_my_secret_key'});
In this example, custscript_my_secret_key
is the ID of the script parameter that you have defined in the script record in the UI.
Please make sure that you have set the value for the parameter in the script deployment and the "Store Value" checkbox is checked in the parameter field creation.
Remember, the parameter values are not automatically passed to the Map/Reduce script. You need to explicitly get them using the getParameter
method.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
11/13/2024, 7:27 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.825761259
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.825704
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.822272062
Celigo AI
11/13/2024, 7:27 AM