After executing Change Category $L.file and $L.file.save have same values

  • KM536149
  • 19-Dec-2008
  • 19-Dec-2008

Summary

SCR 32964 corrected exit path in Service Manager 7.10, the code change can be applied to prevent this in earlier systems. See Workaround/Fix to correct the code in the im.newcat Process Record.

Error

When the im.newcat Process record is done processing the $L.file.save variable contains the new category schema (including assignment group) values, not the original values which is resulting in the activity record containing bad values.
.

Cause

Improper exit path defined when comparing the old and new categories in the im.newcat Process Record.

Fix

SCR 32964 was opened to address this issue. The following solution can be implemented to prevent this from occurring. These changes were corrected in the Service Manager 7.10 implementation and it is recommended that all customers on prior versions should update the im.newcat record with the changes.


Make two changes to the im.newcat Process record:
1. Change the final expression from:
if same($L.old.category, category in $L.file) then (subcategory in $L.file=nullsub(subcategory in $L.file, $L.old.subcat);problem.type in $L.file=nullsub(problem.type in $L.file, $L.old.probtype);product.type in $L.file=nullsub(product.type in $L.file, $L.old.prodtype)) else ($L.exit="newcat")
to
if same($L.old.category, category in $L.file) then (subcategory in $L.file=nullsub(subcategory in $L.file, $L.old.subcat);problem.type in $L.file=nullsub(problem.type in $L.file, $L.old.probtype);product.type in $L.file=nullsub(product.type in $L.file, $L.old.prodtype))


2. Add the following to be called after:
$L.cat.query="name=\""+category in $L.file+"\"";$L.void=rtecall("select", $L.return.code, $L.category, $L.cat.query, {}, false)
This will prevent the process from calling the create.file.save panel and reselect $L.category so that the variable is bound to the new category.