Unmask a Masked Field

IT9
Mega Contributor

Hello All,

I have a masked field under a RITM form which obtains testing password from users. Do you have any idea that I can unmask the value and send the password through an email notification?

find_real_file.png

Thanks very much for your help!

Queenie

5 REPLIES 5

varuntayal
ServiceNow Employee
ServiceNow Employee

Please use only documented way of getting decrypted value of a masked variable. Above code won't guarantee the correct decryption.

https://docs.servicenow.com/bundle/quebec-application-development/page/script/server-scripting/concept/c_ScriptableServiceCatalogVariables.html

This documents provide following API

  • now_GR.variables.<var_name>.getDecryptedValue(): Get the decrypted value for a masked variable. Applicable only for a masked variable.

Please use this only.