element_id in journal entry table doesn't map to incident number

Bonnie4
Mega Contributor

I am asked to created a report on customer communication for incident. I created a database view to link the journal entry table with task table by element_id in journal entry table with sys_id in task table. But element id from journal entry doesn't amp to the sys_id in task tabel when task type is incident. May I please ask if anyone know if there is anything can be done to resolve this?

1 ACCEPTED SOLUTION

Onkar Pandav
Tera Guru

Hi,

Try to create database view on "Incident" and "Journal Entry" tables.

Further try writing a where clause on Journal Entry table like inc_sys_id=journal_element_id.

(Assuming prefix inc for incident and journal for journal entry tables).

View solution in original post

6 REPLIES 6

Bonnie4
Mega Contributor

I also copied some element id from journal entry table and searched them in incident table. No match found. However, if I join journal entry table with task table, there are match found for requested items.

Hi,

what is the where clause you are using

Regards
ankur

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