SC Task variable not triggering Update

dbaril
Tera Expert

I have a variable listed on the sc_task screen that will not trigger an update Business Rule on the RITM table when it is updated on the task screen.  However, if I update the same variable from the RITM screen the BR is triggered.

 

For testing purposes, I have a very simple condition set for a business rule on the sc_req_item table.  It only checks for an update to a specific catalog item.  The BR displays the previous and current values of the variable I am updating.

 

    current.work_notes = 'current value ' + current.variables.cost_center.toString();
    current.work_notes = 'previous value: ' + previous.variables.cost_center.toString();
 
When I update the variable from the task screen, the entries logged show no value for both current and previous values.  When I update the variable from the RITM screen, the current value correctly shows the new value entered.
1 ACCEPTED SOLUTION

If you have a variable that can be updated on RITM and SCTASK records, then you need two Business Rules, one on the sc_req_item table, and one on the sc_task table.  These should run before Update, with whatever Filter Conditions you need.  I tested both with your script (different variable name) and am seeing the work note on each record with the current and previous variable values in both cases.

View solution in original post

3 REPLIES 3

Brad Bowman
Kilo Patron
Kilo Patron

So on your Business Rule that is on the sc_task table, the work_notes are updated but missing the current and previous values?

The business rule is on the sc_req_item table.  If I update the variable from the task screen, no work notes are added.  If I update the variable from the RITM screen, work notes are added, and the current value is correctly displayed.

 

If I change the business rule to the sc_task table I don't get any work notes for either scenario.  

If you have a variable that can be updated on RITM and SCTASK records, then you need two Business Rules, one on the sc_req_item table, and one on the sc_task table.  These should run before Update, with whatever Filter Conditions you need.  I tested both with your script (different variable name) and am seeing the work note on each record with the current and previous variable values in both cases.