Hello, I have a CSV file, with several columns, in a column I have ID of a bean in a custom module, and I have 3 other column of a custom module with the ID of bean of another module.
I need with REST API 4.1 to create a relationship of the 3 ID’s to the first bean.
I need that in subpanels of the first bean I can see the 3 records…
I can’t find example for this problem.
this is my PHP code to create parameters of method:
$set_relationship_parameters = array(
//session id
'session' => $sessId,
//The name of the module.
'module_name' => 'PAC_Pacchetti_prodotto',
//The ID of the specified module bean.
'module_id' => $id_pacchetto,
//The relationship name of the linked field from which to relate records.
'link_field_name' => 'pac_prodotti_per_pacchetti',
//The list of record ids to relate
'related_ids' => array(
$array_id
),
//Sets the value for relationship based fields
// 'name_value_list' => array(
// array(
// 'name' => 'contact_role',
// 'value' => 'Other'
// )
// ),
//Whether or not to delete the relationship. 0:create, 1:delete
'delete'=> 0,
);
echo $set_entries_result=restRequest('set_relationship',$set_relationship_parameters);
Someone can help me?