Variable editor on sc_task will break the Form when attaching file in Rome


Description

Variable editor on sc_task will break the Form when attaching file in Rome.
This works fine when attach in sc_req_item.

Steps to Reproduce

Not all OOB have this issue
Reported fro instance upgrade from Paris to Rome
1. create a variable editor which has variable could attach file
2. adding variable editor to a sc_task form
3. create new sc_task record and attached file in the field of variable editor.
4. after save The file won't be attached and the form will be broken.

Workaround

Dev provided a couple of workarounds here. Please take any one which you find suitable.

1. Prevent the attachment type variable from appearing on sc_task. If they had this variable marked global, uncheck global field. If it was added to sc_task by Workflow or Flow, please remove this variable from there.
OR
2. Remove variable editor from sc_task.
OR
3. Make changes to OOB sysevent_script_action record.
Go to sysevent_script_action_453927d7c740101046e7dc8703c26082.xml record. Go to the line where we are lchecking for targetTableName to be "sc_req_item" or "sc_cart_item"
i.e line if
if (targetTableName == 'sc_req_item' || targetTableName == 'sc_cart_item') {
change it to
if (targetTableName == 'sc_req_item' || targetTableName == 'sc_cart_item' || targetTableName == 'sc_task') {
and save it.

IMPORTANT NOTE: Please note making changes to OOB xml files in not encouraged as it prevents further updates to them. Before upgrading to next version, please make sure to revert it to OOB version. We have many changes in this file after Rome.

Go for the third workaround only if you can't go with the first two.


Related Problem: PRB1548356