Error - Unable to locate sn_hr_core_task 'sys_id' for inbound email processing

Sowbarnika S2
Tera Contributor

Hi,

I’m encountering the error “Unable to locate sn_hr_core_task ‘sys_id’ for inbound email processing” when an external user replies to HR task emails. In some cases, the reply is being attached to the HR task which is sent by the same external user. This issue occurs only with certain HR tasks, and I’m unsure why it doesn’t affect all of them. 

SowbarnikaS2_1-1770632430198.png

I’ve reviewed several community articles on this topic, but none have helped resolve the issue.
https://www.servicenow.com/community/hrsd-forum/unable-to-locate-sn-hr-core-case/m-p/1290530
https://www.servicenow.com/community/hrsd-forum/unable-to-locate-sn-hr-core-case-for-inbound-email-p...
https://www.servicenow.com/community/hrsd-forum/unable-to-locate-sn-hr-core-task-sysid-for-inbound-e...

 

6 REPLIES 6

Mark Manders
Mega Patron

Inbound emails are handled as the user that send them. So that user needs to have access to the record. If you have a script that looks for the sys_id of the record and the user isn't allowed to view the record, it's not found. That the email is linked to the same record could be due to the OOB recognition of the watermark in the email, but that's just guessing since you haven't shared the email or the script(s) that should handle these.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Hi Mark, 

Below is the inbound action script running for HR task. For the HR tasks, I have mentioned above, both the HR task are replied by the same external user (eg-abc@gmail.com - User doesn't belong to Servicenow (Guest). For HR task A, his reply email is getting attached to the record, but for the HR task B, the reply email is not getting attached and the error string shows the message "Unable to locate sn_hr_core_task 'sys_id' for inbound email processing". For both the emails sent from the external user contains the watermark of the respective HR task

SowbarnikaS2_0-1770634177364.png

gs.include('validators');

if (current.getTableName() == "sn_hr_core_task") {
	current.comments = "reply from: " + email.origemail + "\n\n" + email.body_text;
	current.state = 18;
	current.update();
}


 

Check on the restrictions for the task it can't read. Apparently it's able to see task A, but not B. So probably that table has restrictions, or the user isn't part of it, while it is for A (like caller/watchlist/opened by, etc.)

You can utilize the Access Analyzer, select the record and the user and check why the user isn't allowed access. As I mentioned: records are checked on access by the 'from' when inbound actions are applied. 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Ankur Bawiskar
Tera Patron

@Sowbarnika S2 

is that user able to read the HR task table?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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