|
mshe
User
Location: Markham, Canada
Joined on: 02-Feb-2006 23:31:34
Posted: 167 posts
|
Is it possible to get access to the entity prior to save? I would like to write an auditor that writes some auditing data with the complete list of values changed pior (or after) saving.
Thanks.
|
|
|
daelmo
Support Team
Location: Guatemala City
Joined on: 28-Nov-2005 23:35:24
Posted: 8088 posts
|
Yes, it is. I recommend you to download the Auditing example at example's section to understand how to do that.
|
|
|
mshe
User
Location: Markham, Canada
Joined on: 02-Feb-2006 23:31:34
Posted: 167 posts
|
daelmo wrote: |
Yes, it is. I recommend you to download the Auditing example at example's section to understand how to do that. |
Thanks, I understand I can get the changes to each field; but is there a way to detect ALL change to the entity prior to saving (or after) wards?
I like to write one auditing record containing all the details of the changed fields?
|
|
|
daelmo
Support Team
Location: Guatemala City
Joined on: 28-Nov-2005 23:35:24
Posted: 8088 posts
|
Quote: |
I like to write one auditing record containing all the details of the changed fields? |
No, you have to detect the changes per field on the corresponding event, then before save you can get those together and write your auditor record. Please review the example to see what I mean . I think there is no other way as if you use the OnUpdateExistingEntity event, the event is called right after the entity was saved, so there is no posibility to detect the old value.
|
|
|
|