AnsweredAssumed Answered

Soap Web Service Relationship create failed

Question asked by Syed Asif Iqbal on Mar 11, 2015
Latest reply on Mar 12, 2015 by Syed Asif Iqbal
Hi,

Can someone please help check my code about creating relationship between accounts and contacts using soap web service. It returns create equal zero means failed to create relationship. 

See the code below.

$response = $this->client->call('set_relationships',
     array(
      'session'=>$this->session_id , 
      'module_name'=>'Contacts', 
       'module_id' => '91043514-b65e-dac3-b84e-54fffbaf5c7e',
      'link_field_name' => 'contacts',
      'related_ids' => array(
       '4e2df5e2-a17e-95e1-dc3b-54ffcb9f893a',
             ),
     //Sets the value for relationship based fields
       'name_value_list' => array(
          array(
            'name' => 'primary_account',
            'value' => '1'
            ),
          ),
       'delete'=> 0,
       )
     );

Both IDs already exists in Contacts and Accounts module.

Regards
Asif

Outcomes