Page 1 of 1

Customer Info Change

Posted: Fri Jun 10, 2011 7:40 am
by vashts1980
I'm working on an integration project, and I was wondering if there was a way to track if a user's information changed. Most notably if the addresses changed. I saw the IsDirty property, but I wasn't sure if it correctly applied. My integration code is to be executed at the end of the CheckedOut method in the OnePageCheckout.acsx.cs file.

--Mike

Re: Customer Info Change

Posted: Mon Jun 13, 2011 7:08 am
by AbleMods
The user object class does not have any fields for date-added or date-modified. Nor does the addresses table. Your only option would be to create an SQL trigger on ac_Users and ac_Addresses so you can maintain the add/edit status of a each record in a separate table. Or if you have full source, just modify the base object classes and add your own date-added/date-modified fields.

The IsDirty() flag is only used internally by the database engine and only for a specific instance of the object itself. Once a specific instance of an object is saved back to disk, IsDirty() flag for that object instance is reset to false. I wouldn't recommend relying on it to determine if changes were made to address or user objects as a whole.