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-25-2024 01:02 PM
Hi @Gpope,
Can you update the script as below and I highly recommend running it in the background script first.
var companyGr = new GlideRecord('core_company');
companyGr. get(current.getValue('u_supplier_name_ref'));
var encrypter = new global.GlideEncrypter();
g_scratchpad.vatCode = encrypter.decrypt(companyGr.getValue('u_vat_code'));
Can you confirm that u_supplier_name_ref contains the sys_id of a Company record?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 06:22 PM - edited 04-24-2024 06:29 PM
Hi @Gpope ,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 06:44 PM
Haven't seen this before, thanks for sharing!
Just to add to DYCM's comment, you will need to log out and log back in after Step 1 so that the role is applied.
And it looks like the value of the 'Crypto module' can vary depending on where you are invoking the function.
When I ran the script in the background script, the error log mentioned global.com_snc_core_automation_glideencrypter instead. So make sure you use the right value that is mentioned in the error log.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 09:27 PM
@James Chun , good point, I forgot to mention, thanks for bringing this up - the value of the 'Crypto module' can vary 😉
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024 12:49 PM
Hi @DYCM !
Thanks for your response in here, but unfortunatelly I'm not seeing anything even searching by *encrypter on the logs.