Print Page | Close Window

Previous values of object

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2059
Printed Date: 03-May-2025 at 6:47pm


Topic: Previous values of object
Posted By: BillG
Subject: Previous values of object
Date Posted: 11-Aug-2010 at 7:49am
I have an object called SalesInvoiceLine which maps to a table called SalesInvoiceLines. Before I save the object I want to know if the quantity field has changed in order to know if I have to update the inventory and by how much. How do I see the previous value of the row?
 
Bill
 



Replies:
Posted By: ting
Date Posted: 13-Aug-2010 at 6:36pm

Good question.  This should do it:

originalValue = lineItem.EntityAspect.GetValue(SalesInvoiceLine.PropertyMetadata.Quantity, EntityVersion.Original);
 



Print Page | Close Window