Aaron McCausland
05/09/2025, 8:54 PMCeligo AI
05/09/2025, 8:54 PMAI generated answer (using internal Slack threads):In SuiteScript 2.0, you can get a script parameter-based User preference in a context or script-type that is not user-triggered, such as a scheduled workflow, by loading the script deployment record and then getting the value of your parameter. Here is a sample code snippet:
javascript
var scriptObj = runtime.getCurrentScript();
var parameterValue = scriptObj.getParameter({name: 'custscript_my_script_parameter'});
In this example, custscript_my_script_parameter
is the ID of the script parameter you want to retrieve.
If you need to get a parameter from a different script, you can load the script deployment record and then get the value of your parameter.
If you want to add a new field to the Company General preferences, you can do it on most script types (i.e. User Event, Map/Reduce, Client, etc). When you create a script record you can add Parameters - if set to “Company” preference, they will be displayed on Company General Preferences.
******
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
05/09/2025, 8:54 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.843603253
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.833990574
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.832446933
Celigo AI
05/09/2025, 8:54 PMAaron McCausland
05/09/2025, 8:56 PM