How to encrypt text while inserting from Transform map
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2025 06:03 AM
Hello All,
When importing data from Transform map getting error like Error occured during row insert, and then I check all excel sheet field value one by one and found that there is one field with Type = Encrypted Text. Then I try to insert with source script but its not working. Below script I tried but not working.
answer = (function transformEntry(source) {
//Add your code here
var plainText = source.u_secure_notes;
var Encryption = new GlideEncrypter();
//target.secure_notes = Encryption.encrypt(source.u_secure_notes);
GlideSession.get().getEncryptionContext().setCurrent('secure_notes');
var encryptedValue = Encryption.encrypt(plainText);
target.secure_notes = encryptedValue;
gs.info("Transform: Encrypted value inserted in" + target.secure_notes);
return source.u_secure_notes;
})(source);
Thank You
0 REPLIES 0