Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to get value from password field.

Community Alums
Not applicable

Hi folks,

How can we retrieve value in the password field. Can we achieve this using scripting ?

5 REPLIES 5

Tushar Walveka2
Tera Guru
var gr = new GlideRecord('<table which holds the password field>');
gr.get('<sys_id of the record which has the passoword field>');

var Encrypter = new GlideEncrypter();

var encrypted = gr.<Name of the password field>; 

var decrypted = Encrypter.decrypt(encrypted);

gs.print("encrypted.. " + encrypted);

gs.print("decrypted.. " + decrypted);