Compare data before and after records are edited
I work on a Sales Order project. I have SalesOrder and SOLine tables. SOLine is the detail products line for SalesOrder and it is a portal inside SalesOrder Layout. It works now. And I need to compare the portal each lines record fields between "before enter to a SalesOrder" and "after Exit that SalesOrder". I need to record the changes during SOLine editing. How can I do it?