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
OLD_VALUE function on reference attribute
-
- Posts: 595
- Joined: Sun Apr 24, 2005 2:22 am
- Contact:
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)
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