- $Values = $Object->CustomFieldValues( $CustomField->id );
- $Values->Columns(
- qw( id CustomField ObjectType ObjectId Disabled Content
- ContentType ContentEncoding SortOrder Creator Created
- LastUpdatedBy LastUpdated )
- );
- # Don't take care of $Values if there isn't values inside
- undef ( $Values ) unless ( $Values->Count );
+ if ( $Object->Id ) {
+ $Values = $Object->CustomFieldValues( $CustomField->id );
+ $Values->Columns(
+ qw( id CustomField ObjectType ObjectId Disabled Content
+ ContentType ContentEncoding SortOrder Creator Created
+ LastUpdatedBy LastUpdated )
+ );
+ # Don't take care of $Values if there isn't values inside
+ undef ( $Values ) unless ( $Values->Count );
+ }
+}
+
+my $Name;
+if ( !$NamePrefix ) {
+ $Name = GetCustomFieldInputName(Object => $Object, CustomField => $CustomField, Grouping => $Grouping );