Hello everyone!
I’m having some issues with the SuiteCRM API, specifically with relationships. I’m trying to create an account->Security Group association via SOAP API using the following code:
$relationshipAccGroup = array(
'session' => $session_id,
'module_name' => 'Accounts',
'module_id' => '231300c3-feef-6230-b4ac-567163682', //> Account uuid
'link_field_name' => 'SecurityGroups', //> from vardef
'related_ids' => array(
'e8ae920c-fd0d-b8d5-0e14-5671630f8f20' //> Security Group uuid
),
'name_value_list' => array(),
'delete' => 0
);
// get result
$relationshipAccResult = $client->call('set_relationship', $relationshipAccGroup);
While the result is
Create relationship |Accounts <=> SecurityGroups| Result >>
Array
(
[created] => 1
[failed] => 0
[deleted] => 0
)
when a user logs into SuiteCRM the relationship is not shown (I’m an On:Demand user so no direct access to the DB to check whether it exists or not), and the get_entry_list call returns the following
Array
(
[result_count] => 1
[total_count] => 1
[next_offset] => 1
[entry_list] => Array
(
[0] => Array
(
[id] => 231300c3-feef-6230-b4ac-5671636829b2
[module_name] => Accounts
[name_value_list] => Array
(
[0] => Array
(
[name] => id
[value] => 231300c3-feef-6230-b4ac-5671636829b2
)
[1] => Array
(
[name] => name
[value] => La Lanterna
)
)
)
)
[relationship_list] => Array
(
[0] => Array
(
[link_list] => Array
(
)
)
)
)
Am I doing something wrong? Any suggestion would be really appreciated!
Regards,
FG