sales update clean-up job deletes batch parameters

Hi all,

we have only recently started using the Clean-up jobs in the sales ledger. As it turns out, it also deletes the batch task parameters for our various billing runs. For now we have simply disabled the deletion of records in SalesParmUpdate, but obviously that doesn’t really solve the problem.

I am looking for two bits of information:

1.) Is anybody else experiencing the same problem? If so, have you found a solution? Is there maybe a hotfix for this?

2.) From investigation I can tell that the underlying issue really is that the parameters stored with the batch task are actually the packed variables from SalesFormLetter_Invoice, however, that does not include the SalesParmUpdate data needed for the batch run, only the ParmID. This could be solved in two ways:

  • make sure that when the SalesFormLetter_Invoice class is packed, it also packs the entire row in SalesParmUpdate that holds the relevant settings (and then use them when unpacking), or
  • modify the clean-up job such that before deleting rows in SalesParmUpdate it goes through all batch tasks, identify the ones that reference a class that inherits from SalesFormLetter, extract the ParmID from the parameters of those tasks and store them in a list, finally only delete those records in SalesParmUpdate that do NOT reference any of these ParmID values.

Has anybody got an opinion on this? I would prefer the first solution, but would like to see what the experts say.