Why am I receiving the error : Details: Referenced...
# ask-stanley-ai
u
Why am I receiving the error : Details: Referenced secret: ‘custsecret_api_key’ is not available. this is after I deploy to the account where the secret was created and the secret is available to my suiteapp
c
AI generated answer (using internal Slack threads):
Based on the conversations, the error
Referenced secret: ‘custsecret_api_key’ is not available
is likely due to the fact that the
custsecret
object is not available in the account where you are trying to deploy your SuiteApp. When you create a
custsecret
in the NetSuite account, it is not automatically available in all other accounts where your SuiteApp is installed. The
custsecret
object is unique to the account where it was created and does not have a global scope. This means that if you need to use the same
custsecret
in different accounts, you will need to create it in each of those accounts individually. If you are trying to use secrets that are unique to each account, you might need to have the users create the
custsecret
in their own account and then provide you with the script id reference in some kind of config/setup page. Your code then would not reference the secret directly, but would look it up as it can be different per account. Another approach could be to store the secrets in an encrypted field on a custom record. You can then work with it like any other field, as long as the role that the script is using has appropriate access to the field. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.828796506
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.82659924
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.823974729
Please provide your feedback on this answer.