While executing a background script by impersonating as encryption admin, I am getting an errors

RakshandaS
Giga Contributor

While executing a background script by impersonating as encryption admin, I am getting an errors like 

Couldn't decipher the stack trace resulting from the following JavaScriptException:
java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null: org.mozilla.javascript.JavaScriptException: java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null: org.mozilla.javascript.Context.makeJavaScriptException(Context.java:2248)

Please help me if anyone is familiar with this type of issue

4 REPLIES 4

Ankur Bawiskar
Tera Patron

@RakshandaS 

are you trying to impersonate someone who has encryption_admin role?

what's your business requirement to do so?

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

RakshandaS
Giga Contributor

Yes, I want to encrypt the attachments and few fields on the incident and service request table.

DeepakK88645261
Tera Contributor

Hi - Were you able to get past this error? We're also seeing same error for non-admin users while calling attachment apis?

Bert_c1
Kilo Patron

tips-on-asking-question-on-community

 

Follow the above and you may get a sensible response.