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

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

please share your configuration

Regards
Ankur

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

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).

journal_element_id=task_sys_id

It is working. The missing incidents were the one that migrated from an old system, hence don't have journal collected in the new system 🙂

All good now thanks

Bonnie4
Mega Contributor

 

Please see the conf of the db view. It contains 2 table sy_journal_field and incident

 

find_real_file.pngAnd

 

the conf for journal entry table

find_real_file.png

The conf for incident table

find_real_file.png