Want to autopopulate worknote on sc_request, sc_req_item, sc_task record after adding attachment on
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
I have requirement that, if on Service portal, catalog item at the time of form submission i add attachment the i want to auto populate work note on sc_request, sc_req_tem, sc_task record that attachment is added. Now current BR is Before and Insert type and working when attachment is added 2nd time after submitting the catalog item on SP and i want to auto populate work note when i add attachment while submission. Give me a solution without disturbing existing script. I want to keep existing script functional.
Current/existing BR -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
17m ago
When you initially add an attachment to a Catalog Item on the request form, the table_name is 'sc_cart_item' then it is changed to 'sc_req_item' when the request is submitted. You can either add 'sc_cart_item' as another OR condition in your if(targetTable... condition, or run the existing script also on Update and add the condition when table_name changes to sc_req_item.