- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 01:01 AM
Dear community,
I am on xanadu 12-02-2024_1408.
I have an issue that my flow does not start when an update is made from record producer to the sys_attachment table .
I analyzed the following:
I have a recordproducer in the S4Y portal where you can upload attachments.
When I upload an attachment to the form, then immediately there is a record in the sys_attachment table where column table_name = ZZ_YYsc_cart_item.
When I click the "Submit" button in the S4Y form, then this record changes from colmn table_name = ZZ_YYsc_cart_item to ZZ_YYchange_request.
Now I want that my flow starts and changes this value from "ZZ_YYchange_request" to just "change_request", because I want that the attachments are visible in the header of a change request.
But my flow does not start.
I paste a screenshot of my flow here, but independent from the screenshot I tested many possibilities in the trigger e.g.: condition = "Changes" or condition = "Changes from" or run different trigger options.
It seems that this is not a real "update" when it comes from RP.
Many thanks for your feedback.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 07:06 PM
having trigger on sys_attachment which is OOB table is not recommended.
In your after insert BR on change_request you can determine that and change the table name prefix and this will be done easily
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 01:06 AM
why not directly change it from ZZ_YYsc_cart_item to change_request?
You will save 1 more hop of logic
record producer is on which table? If it's change_request then check below solution which I shared and you can enhance it further.
Disable ZZ_YY prefix from attachment when added through record producer
Small edit in the above solution as the function name has changed
Please use this line as the function has changed in the OOB script include
new global.VariableUtil().copyAttachment(gr.sys_id, current.getTableName(), current.sys_id);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 01:55 AM - edited 01-21-2025 02:06 AM
The thing is, this behaviour is OOTB from ServiceNow, so the change from ZZ_YYsc_cart_item to ZZ_YYchange_request is done by ServiceNow.
WHen I understand your propsal, then this is business rule that start on every change "insert".
I do not know if we should do it this way, because many change requests do not have an attachment, so I think from a system load perspective the trigger should be more on sys_attachment table - what do you think?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 07:06 PM
having trigger on sys_attachment which is OOB table is not recommended.
In your after insert BR on change_request you can determine that and change the table name prefix and this will be done easily
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader