Scoped GlideElement - getDecryptedValue()

Returns the clear text value for Password (2 way encrypted) fields in scoped applications.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
String The clear text password.
var tablename = 'x_scoped_app_table'
var CI = new GlideRecord(tablename);  
CI.addQuery('number', '0001002'); 
CI.query(); 
CI.next(); 

var password = CI.password_field
var decrypted = password.getDecryptedValue(); 
gs.info(decrypted);
Output:
x_scoped_app: cleartextpassword