- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2014 11:08 AM
Thanks Mandar, I read up some more on the wiki, and the consensus seems to be 'why not just use 'isMemberOf' as you said.
This is the error I am getting.
org.mozilla.javascript.EcmaError: Cannot convert null to an object.
Caused by error in <refname> at line 6
3:
4: var from = gs.createUser(email.body.from);
5: gs.log("***Inbound Action from - " + email.body.from);
==> 6: if (from.isMemberOf('ServiceNow Administrators'||'IT - ServiceNow Support')){
7:
my script is:
s.include('validators');
//var from = email.from;
var from = gs.createUser(email.body.from);
gs.log("***Inbound Action from - " + email.body.from);
if (from.isMemberOf('ServiceNow Administrators'||'IT - ServiceNow Support')){
current.assignment_group = "33194bd90a0a3ce00100f0f13b5f845e";
current.assigned_to = email.from;
current.state = 1;
current.contact_type = "email";
current.short_description = email.subject;
current.insert();
event.state="stop_processing";
}
Once again, many thanks for your help. Mark