Boris
04/16/2025, 3:42 PMCeligo AI
04/16/2025, 3:42 PMAI generated answer (using internal Slack threads):In a Suitelet client script, you can get the script id and deployment id from the current record. Here is how you can do it:
javascript
const curRecord = currentRecord.get();
const scriptId = curRecord.getValue({ fieldId: "script" });
const deploymentId = curRecord.getValue({ fieldId: "deploy" });
In the above code, currentRecord.get()
is used to get the current record. Then getValue
method is used with the fieldId set to "script" and "deploy" to get the script id and deployment id respectively.
For a Map/Reduce script, you can use the N/runtime
module's getCurrentScript()
method to get the current script object, and then access its deploymentId
property:
javascript
var scriptObj = runtime.getCurrentScript();
log.debug('Deployment Id: ' + scriptObj.deploymentId);
******
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
04/16/2025, 3:42 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.859142721
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.854547858
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.850472
Celigo AI
04/16/2025, 3:42 PM