Developer forum

Forum » Dynamicweb 10 » Detecting field changes in UserSaved notification

Detecting field changes in UserSaved notification

Pedro Meias
Reply

Hi,

When subscribing to a UserSaved or UserOnBeforeSave notification, is there a way to know if a user specific user field or custom field had is value changed?

In our case we want to run logic some when a custom user text field is updated, but we would like to do it only if there was a change at this field.

Thank you.


Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Could you subscribe to UserOnBeforeSave, capture the value and store it in HttpContext.Items and then compare it against the current value in UserSaved?

 
Pedro Meias
Reply
Hi Imar,

Thank you for your suggestion . I also thought of this approach as a last resort, but I asked the question to see if there was a better way.
 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

That is the only way

 

You must be logged in to post in the forum