Hello staff i’ve some isssues.
I am making a node and that i want to set a content material reference by title not by id, i am doing this however this isn’t working: ‘field_content_type_items’ is referenced to a different content material kind
$node = DrupalnodeEntityNode::create([ 'type' => 'items', 'status' => $status, 'title' => $title, 'field_content_type_items' => "CUN", ]);
Additionally i attempted with this instance 'field_content_type_items' => [['target_id' => 12]],
however i dont know Drupal Developer id for CUN
so i cant use target_id
additionally i’ve tried:
$node->set('field_content_type_items', 'CUN');
may you please assist me?
How am i able to set a content material title when i create a node?
Regards Mario