Skip to main content
Solved

Auto generated update handler


Guido Bijl
Sidekick
Forum|alt.badge.img+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.

Best answer by Remco

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.

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

2 replies

Remco
Moderator
Forum|alt.badge.img+3
  • Moderator
  • 30 replies
  • Answer
  • November 14, 2023

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.


Guido Bijl
Sidekick
Forum|alt.badge.img+2
  • Author
  • Sidekick
  • 11 replies
  • November 14, 2023

Thank you, i will create an idea.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings