Relationship & sys_attachment: Question?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 10:09 AM
Hey Everyone,
Is there any way to query the table for the table sys id on the sys_attachment table?
Basically I want to get the table_sys_id in my relationship query.
Below is my code.
(function refineQuery(current, parent) {
// Add your code here, such as current.addQuery(field, value);
current.addQuery('table_name', 'x_g_cfd_elims_cases');
current.addQuery('table_sys_id', 'table_sys_id');
})(current, parent);
but it isn't working, what am I missing? I just want to get the attachments from the elims cases with the table sys id to display on the incident table. The elims case created an incident and appears as a related record on the elims case.
Help anyone?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 11:02 AM
Hi @Community Alums
Check with below script
(function refineQuery(current, parent) {
// Add your code here, such as current.addQuery(field, value);
current.addQuery('table_name', 'x_g_cfd_elims_cases');
current.addQuery('table_sys_id', parent.sys_id);
})(current, parent);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 11:18 AM
That doesn't work for me. Not sure why it doesn't.