Issue
- When a user adds an attachment to a catalog item while submitting it, it's not carried forward to the corresponding requested item. Eventually, the attachment is not visible on the requested item.
- The requested item is defined with a custom class name ( i.e. sys_class name is not sc_req_item).
- The issue happens on both Service Portal as well as at the backend (Advanced UI).
Cause
- When you add attachment while submitting the catalog item, an corresponding entry in sys_attachment table is made. This entry suppose to point to the custom requested item table name. But it was pointing to standard requested item table sc_req_item.
- Due to this reason the attachment is not visible.
Resolution
Write a custom logic (before insert/update business rule on the custom requested class table) to update the sys_attachment record's table_name to the corresponding custom requested item table name instead of sc_req_item.
Related Links
See Business Rules in our documentation.