I've added a reference to a Private Key ( created ...
# suitescript
c
I've added a reference to a Private Key ( created at /app/common/scripting/certificates/settings.nl?type=keys ) to a custom record. When I load the custom record using
record.load()
the reference to this field is a numeric internal ID, however, I require the
custkey_
string to pass to
sftp.createConnection
- I cannot see the record type for Private Key anywhere - is there a quick way of getting the
custkey_
id from the numeric ID, or should I just do a saved search on my custom record and join to get the value (which I'd rather not do if there's a cleaner way)?
Worked it out. For future reference, if anyone is interested, you can use
N/keyControl
.
keyControl.findKeys()
with the name returned by
getText()
for the referencing field
Also, I can't see a way of getting it via saved search. You don't get a " xyz Fields..." option for a join when constructing a search in the UI. I can only assume this is intentional, due to keys being keys. Meh