GetFieldOriginalValue
Description
Returns a FieldInfo object containing the value that the specified field will revert to, if the action is cancelled.
When you initiate an action, DevOps Plan caches the original values of the record's fields in case the action is cancelled. You can use this method to return the original value of a field that you have modified. You can get the original value of a field only while the record is editable. The record's notification hook is the last opportunity to get the original value before a new value takes effect.
Syntax
Perl
$entity->GetFieldOriginalValue(field_name);
- Identifier
- Description
- entity
- An Entity object representing a user data record. Inside a hook, if you omit this part of the syntax, the Entity object corresponding to the current data record is assumed.
- field_name
- A String containing a valid field name of this Entity object.
- Return value
- A FieldInfo object that contains the original value for the specified field.
Example
Perl
my($FieldNamesRef) = $entity->GetFieldNames();
foreach $FN (@$FieldNamesRef) {
# Get the field's original value...
$FieldInfo = $entity->GetFieldOriginalValue($FN);
#...
}