Solved

Auto generated update handler

  • 14 November 2023
  • 2 replies
  • 48 views

Userlevel 1
Badge +2

In our project we have added trace fields, the ‘problem’ we are having with auto generated update handlers is that [added_by] and [added_on] are part of the update handler. This means they are either overwritten of you have to do a select of the current added_by/added_on when exec an auto generated update handler. Is there a better way around this problem? Other than manually making each update handler or doing a select before executing, this feels like wasted performance. I understand that trace_fields is a seperate project that we’ve added, but i’ve seen it in many thinkwise projects, also the SF itself uses trace fields.

icon

Best answer by Remco 14 November 2023, 15:05

View original

This topic has been closed for comments

2 replies

Userlevel 1
Badge +2

Thank you, i will create an idea.

Userlevel 2
Badge +2

Hi Guido,

Unfortunately, it is currently not possible to influence the generated update statement by for example: excluding columns such as 'added_by' or 'added_on'. This would be a valuable addition. Could you create an idea for this?

For now, the only solution is indeed to add an additional template (automatically) that first overwrites the new value for 'added_by' or 'added_on' with the old one before the update statement code is executed.

You could also explore ensuring that the 'added_by' or 'added_on' is never updated via the default logic. This way, the handler initially does not receive the 'incorrect' data.

Hope this helps.