OLD_VALUE function on reference attribute

If you think that something doesn't work in Aware IM post your message here
Post Reply
osrisd
Posts: 11
Joined: Thu Aug 24, 2006 12:46 am

OLD_VALUE function on reference attribute

Post by osrisd »

Hi,

The OLD_VALUE function does not return the original value of a reference attribute. It has the new value of the reference attribute. eg. Object Employee has reference attribute for object Department, called MyDepartment. When object employee is modified from DeptA to DeptB, the function OLD_VALUE(MyDepartment) returns the value of DeptB, not DeptA.

Is there any other way to access the old value of reference attribute in a business object?

Thanks
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

Yes, OLD_VALUE does not support reference attributes yet. You can use the following workaround for single reference attributes. Add attribute MyDepartmentID to object Employee of type Number and the following rule:

Employee.MyDepartmentID = Employee.MyDepartment.ID

You can access the original reference object like this:

FIND Department WHERE Department.ID = OLD_VALUE(Employee.MyDepartmentID)
Aware IM Support Team
Post Reply