I've been trying to make a form to save credential...
# suitescript
o
I've been trying to make a form to save credentials for external APIs. I limited the form to admin access and I'm trying to make it encode the values for user/pass when it saves but I cannot get the N/encode module to load in the clientscript I'm attaching to my form. Is there a better way of doing that?
i
Why are you trying to perform the encoding on the client side and not on the server side?
o
I'm not sure how. The behavior I was going for was to allow admins to set/update the credentials in a custom form but store the fields encoded and then decode them for the api calls. I thought the way to do that was with a clientscript attached to the form for my custom record using the pageinit and saverecord entry points.
i
You should do it on the server side. Capture the values on the "post" method on the server side, encode them and then save them.