Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Update: Narrative Insights has been restored and is now available.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
How to use a Credential field in post headers
I'm struggling to understand how to use a credential field in a suitelet. The help documentation in NetSuite seems very poor / incomplete in this area. I've successfully used form.addCredentialField before in conjunction with the SFTP module, so I do have some experience with this.
But now, I'm trying to use a credential field to store an authorization token for a service I'm trying to connect to. It uses basic authentication. If I simply copy/past the auth token directly in the script, it works fine:
...
var actualToken = "abc123";
var authorization = encode.convert({ string: accountSID + ':' + actualToken, outputEncoding: encode.Encoding.BASE_64 });
1