- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2020 07:27 AM
Hi All,
We have a requirement to create a case via inbound email action when from address matches user profile in user table.
Use case is like when we send a mail from our outlook to xyz shared mail box, then that shared mailbox will forward that emails to our servicenow instance. When I check in the logs of emails in servicenow Recipients is setting like xyz shared mailbox and user id column is setting it as original sender wh...
Now we want to create a case when that original sender user profile is present in user table.
Could someone help on this usecase please.
Thanks and Regards,
Sukanya.
Solved! Go to Solution.
- Labels:
-
Customer Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2020 02:12 AM
I don't think there is any such restriction as far as i know. May be there is any BR which might be checking for jpgs and restricting it. Kindly check once.
Mark the comments as helpful if they had helped to debug the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2020 11:13 PM
Hi,
what is the error?
Did you check any before insert BR on case table is restricting the insert
can you try to disable BR and check
current.subcategory = 0;
current.setWorkflow(false); // disables BR during insertion
current.insert();
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2020 12:10 AM
Hi Ankur,
I have checked all before business rules on insert on case table and tried deactivating one by one but still no luck.
I am not receiving any error in email logs. It is showing as "Create Case - CMS Security : did not create or update sn_customerservice_case using current"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2020 12:16 AM
Hi Sukku,
May be it is not entering yoru if condtion in your mail script. Can you try this code and check the logs.
var Userem = new GlideRecord('sys_user');
Userem.addQuery('email', email.from.toString());
Userem.query();
gs.info("Test: No. of rows are "+Userem.getRowCount());
if (Userem.next()) {
gs.info("Test: Entered into if condtion");
current.u_requestor = Userem.name;
current.short_description = email.subject.toString();
current.description = email.body_text.toString();
current.contact_type = "email";
current.category = 0; //IS THIS RIGHT VALUE?
current.subcategory = 0; //IS THIS RIGHT VALUE?
current.insert();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2020 01:22 AM
Hi asifnoor,
Script is entering in to if condition previously also. I have tried your script as well row count is coming as 1 and it is entering into if condition but still it is not creating a case. Value for category and subcategory is correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2020 01:28 AM
Hi,
your inbound email action is in which scope?
If it is in global scope then possibly insert from Global scope to a table present in HR Core scope is not allowed and hence insert is not working
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
