darrenhillconsulting
11/27/2024, 3:39 PMCeligo AI
11/27/2024, 3:39 PMAI generated answer (using internal Slack threads):Based on the conversations, it seems that you can add a new field to the Company General Preferences by adding a Parameter under a Script. This can be done on most script types such as 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. Here is an example of how you can get the values of these preferences using SuiteScript 2.1 and TypeScript:
typescript
import * as runtime from 'N/runtime';
let script = runtime.getCurrentScript();
let parameterValue = script.getParameter({name : 'custscript_name'});
In this example, custscript_name
is the name of the script parameter you have set in the Company Preferences. The getParameter
function will return the value of the parameter.
Please note that this is a general example and you might need to adjust it according to your specific needs.
******
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/27/2024, 3:40 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.810817599
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.809257209
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.805316
Celigo AI
11/27/2024, 3:40 PM