Is it possible to decrypt values in an encrypted text field using script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2012 03:49 AM
We have a encrypted text field used on HR table. There is no problem viewing encrypted text field in report under appropriate context. However, when report exported out to Excel data is missing. What we thought is to have a script to get data from HR table and decrypt the encrypted values. When I query the encrypted field by script, it return the encrypted text(a long string). Anyone knows anything about encrypted field content, how we can get the decryted values by script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2013 09:52 PM
Did you manage to fix this issue. I also have similar requirement, where user want to send encryption field value in email.
Regards,
ND
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2013 07:44 AM
Looks like you need to set the context ID for the field and then use getDisplayValue.
http://wiki.servicenow.com/index.php?title=Encryption_Scripting#setContextID
http://wiki.servicenow.com/index.php?title=Encryption_Scripting#Returning_a_Decrypted_Field_Value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2018 06:25 PM
value from an encrypted field can be retrieved in script by using getDisplayValue()
Return a decrypted field value
You can return the field value for an encrypted field by using the getDisplayValue method.
