How to search or query the parameter values of scr...
# ask-stanley-ai
a
How to search or query the parameter values of script deployments
c
AI generated answer (using internal Slack threads):
To search or query the parameter values of script deployments, you can use the
N/record
module to load the deployment record and treat the parameter as a custom field. This can be done in SuiteScript. Here is a pseudo code example:
Copy code
javascript
var record = require('N/record');
var deployment = record.load({
    type: 'customrecord_mydeployment', 
    id: '123'
});
var parameterValue = deployment.getValue('custparam_myparameter');
In this example, replace
'customrecord_mydeployment'
with your script deployment record type,
'123'
with your script deployment record ID, and
'custparam_myparameter'
with your script parameter field ID. Alternatively, you can use SuiteQL to query the parameter values. Here is a pseudo SuiteQL example:
Copy code
sql
SELECT * FROM parametersScript WHERE owner=<scriptid>
In this example, replace
<scriptid>
with your script ID. Please note that these methods will only work if the parameters are not hardcoded. If the parameters are hardcoded, you can see them under the parameters subtab on the script deployment record. ****** 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.875183225
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.858886719
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.856628418
Please provide your feedback on this answer.