Mike Casey
09/03/2024, 7:34 PMCeligo AI
09/03/2024, 7:35 PMAI generated answer (using internal Slack threads):Based on the conversations, there are a few ways to store custom settings that can be edited by authorized users in the UI and can also be accessed in SuiteScripts: 1. Custom Record Type: This is the most preferred method among the users in the conversation. You can create a custom record type and store the settings there. This method provides a GUI for free and you can control who has access to it. You can also block deletion or creation via script if that's a concern. You can load the record as needed and with NFT that record is a natural JS object already. 2. Suitelet: You can use a form Suitelet as a settings page, and store the data in a JSON file in the File Cabinet. However, this method has some limitations. For instance, you can't block deletion or editing of the file external to the intended process. Also, creating a Suitelet from scratch generally results in more code to maintain. 3. Script Parameters: You can use script parameters, and set the "Preference" to "Company". However, this method ties the values to only one script which is not ideal. 4. N/config Module: You can use the
N/config
module to store data that you can use to toggle scripts. You can load general preferences as well "config.Type.COMPANY_PREFERENCES". You can define script parameters as having either company or user preferences. Setting a script parameter to user allows end users to override the default (company) script behavior by going to Home > Set Preferences and clicking the Custom Preferences tab.
Remember, the method you choose depends on your specific needs and the trade-offs you are willing to make.
******
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
09/03/2024, 7:36 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.832527816
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.827317536
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.825407743
Celigo AI
09/03/2024, 7:36 PM