We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How to get value from password field.

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);