Retrieve Password2 Field real value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 11:13 AM
Hi Community!
Anybody can help me with this issue I'm facing?
I have a password2 field on core_company table. I need to get the real value that is on the field, how can I achieve this?
I tried already with glideEncrypter but it's showing me only values like:
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 02:53 PM
You cant do that, sorry. Thats the idea in general of the field type password2. If its 1 way encrypted GlideEncripter will do, but here no way. If you need the passwords either change the field (drop & recreate it) or use before script to save it to new custom field of type 1 way encripted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 03:40 PM
Hi @Gpope,
Do you mind sharing the script?
If it's a password2 type, it can be decrypted but I do remember that the GlideEncrypter function has/will be deprecated.
Cheers

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 04:26 PM
Right, 2 way should be reverable. I am pretty sure the script is this one and needs base64 decode maybe:
var Encrypter = new GlideEncrypter();
var encrypted = current.u_password; // current.<<your field name>>
var decrypted = Encrypter.decrypt(encrypted);
gs.addInfoMessage("encrypted.. " + encrypted);
gs.addInfoMessage("decrypted.. " + decrypted);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024 12:55 PM
Hi @James Chun , code im using now is similar to what Joro said before.