Skip to main content
Answer

Field Updated Handler trigger with SetValueExt

  • May 20, 2024
  • 5 replies
  • 336 views

Forum|alt.badge.img+8

Hi Guys,

 

just wanted to ask if the FieldUpdated handler will fire off when the field is populated via the SetValueExt method.

 

Thanks guys,

Aleks

Best answer by darylbowman

That is one of the documented purposes, yes, as opposed to .SetValue. However, in my experience, there is a difference in behavior between using it in an event handler and using it elsewhere. In an event handler, e.Cache.SetValueExt works very well by itself. Elsewhere, it usually needs a View.Update(row) accompanying it.

I’d love for someone to explain that.

5 replies

darylbowman
Captain II
Forum|alt.badge.img+15

That is one of the documented purposes, yes, as opposed to .SetValue. However, in my experience, there is a difference in behavior between using it in an event handler and using it elsewhere. In an event handler, e.Cache.SetValueExt works very well by itself. Elsewhere, it usually needs a View.Update(row) accompanying it.

I’d love for someone to explain that.


Forum|alt.badge.img+8
  • Author
  • Captain II
  • May 21, 2024

Thanks for confirming @darylbowman !


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • May 21, 2024

@aiwan and @darylbowman  .SetValue will updates/sets the value without any events firing for the respective field where .SetValueExt will invoke the events while modifying the field value.

Here is screenshot for reference.

 

 


darylbowman
Captain II
Forum|alt.badge.img+15

I’m aware. However, why .SetValueExt doesn’t work the same when interacting with a View as with e.Cache is what I’m curious about.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • May 21, 2024

I'm not entirely sure about this case.