- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2018 11:41 AM
I've created an "after insert" business rule on sys_attachment table and I need to take the sys_id of the table or cat_item to check from where an attachment had been sent(from each catalog item). I've tried with current.table_sys_id but it gives me a different table_sys_id than the one displayed on the attachment table and if I try current.table_name is giving me sp_portal instead of sc_req_item. Any idea why or how can I get the actual table sys id ( the one that is displayed in "Table sys ID" field in the sys_attachment table).
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2018 11:50 AM
You should run the business rule on when current.table_name = 'sc_req_item'. Because initially before request submission, the attachments are linked to record producer. Once you submit it, it generates the sys_id of requested item.
then query the sc_req_item with the table_sys_id to get the cat_item from it
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2018 11:50 AM
You should run the business rule on when current.table_name = 'sc_req_item'. Because initially before request submission, the attachments are linked to record producer. Once you submit it, it generates the sys_id of requested item.
then query the sc_req_item with the table_sys_id to get the cat_item from it
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2018 07:32 AM
Hi Sanjiv, thanks for your answer. You're right, I just realized that before submission, the attachments are liked to sp_portal table name. It makes sense now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2021 10:30 AM
Can you please let me know what does table_sys_id refers to ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2022 06:50 AM
The table_sys_id refeers to field on the sys_attachment table. Is the sys_id of the target record - the record you want to add the attachments to.