AnsweredAssumed Answered

How do you set a relationship between Cases and Project?

Question asked by James Moore on Jun 25, 2014
Latest reply on Jun 25, 2014 by Francesca Shiekh
SugarCRM CE Version 6.5.16 (Build 1082)

I'm using http://crm.domain.com/soap.php

function fsetcrmrelationship($module1, $module1id, $module2, $module2id){
        $connectorresponce = fcrmsoapconnector();
        $sessionid = $connectorresponce['id'];
        $client = $connectorresponce['client'];    
        
        $data = array(
            'session' => $sessionid,
            'module_name' => 'Project',
            'module_id' => 'f93d0b11-af5b-c390-31dc-53aaec4fb2e8',
            'link_field_name' => 'Cases',
            'related_ids' => array(
                'd1da3c80-ef72-ecae-821e-53aaec645890',
            ),
            'delete'=> 0,
        );
 
        $soapResponse = $client->set_relationship($data);
        
        return $soapResponse;
    }

I have also tried: upper case, lower case, projects_cases and the below code

$data = array(
            'module1' => 'Project',
            'module1_id' => 'f93d0b11-af5b-c390-31dc-53aaec4fb2e8',
            'module2' => 'Cases',
            'module2_id' => 'd1da3c80-ef72-ecae-821e-53aaec645890',
        );
 
$soapResponse = $client->set_relationship($sessionid, $data);

Keep getting error:

stdClass Object
(
     [number] => 20
     [name] => Module Does Not Exist
     [description] => This module is not available on this server
)







Outcomes