Database view and Document ID
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2025 01:22 PM
Hello all,
I have been scanning the community for all articles related to Document ID with the goal of obtaining the sys_id from that type of value. And it seems its not that simple. One suggestion in the following post was:
"I don't think you can get sysId directly of the record being referred by Document ID field....
you can try to create database view table and then export and then it might contain sysId"
I am trying that approach. Here is my database view:
So, I am trying to get all email attachments that were discarded. Then obtaining the email referenced in those. And obtaining the task (specifically Ticket) referenced in the email's 'instance' field (which is of Document ID type).
However no record is being returned and I have 101 records that satisfy the conditions. Can anyone see what is wrong here?
Also, this is very similar to the OOTB incident_metric one and that works fine:
Note: The mi_definition field is of type Document ID.
Appreciate any help.
Thanks,
Deb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2025 07:45 AM
Hello @dp11
Your ticket table Where Clause should look like this:
email_instance=tkt_sys_id
Note: Remove the current Where Clause
Thank You!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2025 07:50 AM - edited ‎03-25-2025 07:50 AM
I actually had it like that to start with but had added the second condition in response to Ankur's suggestion. Now have put it back like earlier but still no output:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2025 07:57 AM - edited ‎03-25-2025 08:06 AM
Can you do it exactly like this only difference is I used Incident table
Output:
Thank You!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2025 08:07 AM
Modified to match yours but no luck 😞
If it works for incident in your case I believe it should work for any type of task. Here is one of the relevant emails whose attachment was discarded and that has the Document ID with Ticket table So I am expecting this should show up in the database view result but it doesn't.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2025 08:20 AM
I think I got your problem. The problem is that the Attachment field is blank in the Email Attachment table
Now, what you can do is
Go to the sys_email_attachment table > Create a record manually like below
Thank You!