Hello,
I am trying to add notes to case, But could not find url how to attach.
I followed steps given in
https://www.zoho.com/crm/help/api/getrelatedrecords.html to get records of notes of particular cases, but it didnt work..
My code is -
$xml = " <Notes>
<row no=\"1\">
<FL val=\"entityId\">" .$openCaseId. "</FL>
<FL val=\"Note Title\">".$Conversation. "</FL>
<FL val=\"Note Content\">".$Message. "</FL>
</row>
</Notes>";
$url ="
https://crm.zoho.com/crm/private/xml/Notes/insertRecords";
$query="authtoken=".$ApiKey."&scope=crmapi&newFormat=1&xmlData=".$xml;
$ch = curl_init($url);
$headers = array(
'Content-Type:application/json',
'Authorization: Token token='. $ApiKey
);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, $query);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 50);
$server_output = curl_exec($ch);
$info = curl_getinfo($ch);
$client = new ZohoCRMClient('Notes', $ApiKey);
$records = $client->getRelatedRecords()
->id($openCaseId)
->parentModule('Cases')
->request();
foreach ($records as $record){
print_r($record);
}