i want to copy a field from one entity to another while processing a rule. my current code looks like this:
<?php
$entity_created->field_ort = $entity_fetched->field_ort;
?>
but instead i get an error message:
Notice: Trying to get property of non-object in eval() (Zeile 3 von /www/www/sites/all/modules/rules/modules/php.eval.inc(125) : eval()'d code).
so i found this site http://drupal.org/node/1000200 which tells me that i need to do this more like this:
<?php
$entity_created->field_ort['und'][0]['value'] = $entity_fetched->field_ort['und'][0]['value'];
?>
but what about lists and other fields? is there a more generic approach? i need to copy about 5 or more fields.