GetInvalidFieldValues

Description

Returns an array of FieldInfo objects corresponding to all the Entity's fields with incorrect values.

The FieldInfo objects are arranged in no particular order. Use this method before committing a record to determine which fields contain invalid values, so that you can fix them.

Syntax

Perl


$entity->GetInvalidFieldValues(); 
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.
Return value
A FieldInfos Object collection is returned.

Example

Perl


# Get the list of field values

$fieldvalues = $entity->GetInvalidFieldValues();



$numfields = $fieldvalues->Count();



for ($x = 0; $x < $numfields ; $x++)

   {

   $field = $fieldvalues->Item($x);                                       

   $fieldvalue = $field->GetValue();

   $fieldname = $field->GetName();

   # ... other field commands

   }