eliyahu moskowitz
02/17/2025, 4:00 PMrequire(['N/file', 'N/sftp', 'N/certificateControl'], (file, sftp, certificateControl) => {
var connection = sftp.createConnection({
username: 'sftpuser',
secret: 'custsecret1', // This is the reference to the script ID.
url: '172.25.182.109',
port: 22,
directory: 'certificates'
});
try {
var cert = certificateControl.createCertificate({
name: 'NAAcert2020',
file: connection.download({
directory: '2020',
filename: 'NAA_cert.pfx'
}),
password: 'custsecret2' // This is the reference to the script ID.
});
var certId = cert.save();
} catch (e) {
log.error(e.message);
}
});
But I don't understand any of these values except for my secret ID. Username? url, port directory etc .... ?
Anyone have any idea?
thanks!erictgrubaugh
02/17/2025, 4:03 PMeliyahu moskowitz
02/17/2025, 4:04 PMerictgrubaugh
02/17/2025, 4:08 PMhttps.createSecureString()
and/or https.appendSecureString()
then:
• https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_4418247678.html
• https://system.netsuite.com/app/help/helpcenter.nl?fid=section_0305042314&whence=#subsect_64151802701eliyahu moskowitz
02/17/2025, 4:10 PMlet apiKey = https.createSecureString({
input: '{CUSTSECRET_SOME_INTEGRATION}'
});
when i do this, i just get {}eliyahu moskowitz
02/17/2025, 4:11 PMerictgrubaugh
02/17/2025, 4:13 PMeliyahu moskowitz
02/17/2025, 4:23 PM{
Authorization: "https.SecureString:https.SecureString"
}
eliyahu moskowitz
02/17/2025, 4:24 PMerictgrubaugh
02/17/2025, 4:32 PMlet response = https.delete({
url: requestUrl,
headers: {
'Authorization': https.createSecureString({ input: 'Bearer {custsecret_airtable}' })
}
})
erictgrubaugh
02/17/2025, 4:33 PMeliyahu moskowitz
02/17/2025, 5:22 PM