Hi ctomasi



Earlier I was using the below code


current.short_description = email.subject; // Set email subject


current.description = email.body_text; // set email body


current.u_requestor = email.from; // set email caller


current.state = 1; // set state to new


current.contact_type = "email"; // set channel to email


current.priority = 4; // set priority to low


current.company = gs.getUser().getCompanyID();// Set company


current.insert();



The above code is working fine. Now If any user sends the email to servicenow who are not present in the database I need to set the caller field as "guest". Could you let me know how to do this as I am facing issues


Regards
Harish

Hi Harish,



i hope,


      if user is not available in servicenow database, servicenow will consider user as guest( out of the box).


As noted earlier, gs.log() is not available in scoped applications. Please use the scoped debugging methods in scoped scripts.



Scoped Script Logging - ServiceNow Wiki


View solution in original post

Thanks Chuck. gs.log was the issue.


Regards
Harish

You are welcome. I'm glad you got it resolved. It took me a while to convert, but now i use the new methods in global or scoped apps.