Hi All, Has anyone worked with `form.addCredential...
# suitescript
r
Hi All, Has anyone worked with
form.addCredentialField
would like to pick your brain about storing the hashed values in a custom record and then trying to retrieve it later and decode it? Objective is to not store password in plaintext and use it later for API call
b
thats not how hashing works in general
hashing is one way
you can use a credential field, or the more modern api secrets with modules like N/https
r
I was referring to the encrypted text that comes out of that field. Hashed might not be the correct term
b
its not a hash
👍 1
nor is the text encrypted
its just an id to a string that netsuite does a lookup with
r
Ohh I see
so its copied to a NetSuite lookup type thingy
so Can i retrieve it when calling a endpoint? provided that script has access when the field was created?
I have used the NS example but only in a Suitelet not something stored on a custom record
b
basics of working with api secrets/guids is that its implemented in a way such that your script cant get access to the text
you can use the secrets in template strings
which netsuite will render before it sends the data out using a supporting module
for example, netsuite would render the string before sending an https request