To mark this question as solved, I will post the answer by myself.
I made a PHP Userfunc. The UserFunc is able to read the FlexForm Value.
Here is my solution:
The Typoscript object:
includeLibs.FlexformValue = fileadmin/templates/Utility/UserFunc/FlexformValue.php
5 = USER
5 {
userFunc = FlexformValue->field
userFunc {
uid = TEXT
uid {
field = uid
}
field = referenceCustomer
}
}
And the needed PHP UserFunc:
<?php
/***************************************************************
* This script is part of the Typo3 project. The Typo3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
class FlexformValue {
function field($content, $conf) {
$conf = $conf['userFunc.'];
$uid = $this->cObj->stdWrap($conf['uid'], $conf['uid.']);
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('pi_flexform', 'tt_content', 'uid = ' . $uid);
$flexform = \TYPO3\CMS\Core\Utility\GeneralUtility::xml2array(current($GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)));
$this->temporaryDceProperties = array();
if(is_array($flexform)) {
$this->getVDefValues($flexform, $this);
}
return $this->temporaryDceProperties[$conf['field']];
}
/**
* Flatten the given array and extract all vDEF values. Result is stored in $this->dceProperties.
*
* @param array $array flexform data array
* @param Object $caller
* @param null|string $arrayKey
* @return void
*/
public function getVDefValues(array $array, $caller = NULL, $arrayKey = NULL) {
if ($caller === NULL) {
$caller = $this;
}
foreach($array as $key => $value) {
if ($key === 'vDEF') {
$caller->temporaryDceProperties[substr($arrayKey, 9)] = $value;
}
elseif (is_array($value) && array_key_exists('el', $value)) {
$propertyName = substr($key, 9);
$values = array();
$i = 1;
if (is_array(current($value))) {
foreach (current($value) as $entry) {
if (is_array($entry)) {
$entry = $entry['container_' . $propertyName]['el'];
if (is_array($entry)) {
foreach($entry as $k => $v) {
$entry[$k] = $v['vDEF'];
}
$values[$i++] = array('container_' . $propertyName => $entry);
}
}
}
}
$caller->temporaryDceProperties[$propertyName] = $values;
} elseif (is_array($value)) {
$this->getVDefValues($value, $caller, $key);
}
}
}
}
I hope this answer will help someone who has the same problem then me..
Question solved.