- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2017 05:26 AM
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
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2017 05:31 AM
Hi Harish,
i hope,
if user is not available in servicenow database, servicenow will consider user as guest( out of the box).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2017 05:29 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2017 06:46 AM
Thanks Chuck. gs.log was the issue.
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2017 06:50 AM
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.