Read/pickup the desktop file push to incident of service cloud
Content
Hi,
I am trying Read/pickup the desktop file push to incident of service cloud using Connect PHP API.
but i am getting empty result and am using the below code
please help me this issue
Version
Service CloudCode Snippet
<?php /** * CPMObjectEventHandler: fileattachement * Package: RN * Objects: Incident * Actions: Create * Version: 1.2 * Purpose: create a Incident in Salescloud */ use \RightNow\Connect\v1_2 as RNCPHP; use \RightNow\CPM\v1 as RNCPM; class fileattachement implements RNCPM\ObjectEventHandler { public static function apply($runMode, $action, $incident, $cycle) { if ($cycle !== 0) return; //ob_start(); $myFile = "JRRTEST.txt"; $fh = fopen($myFile, 'r'); $theData = fread($fh, filesize($myFile)); fclose($fh); echo $theData; //echo fread($myfile,filesize("test.txt")); //fclose($myfile); //echo $myfile; $msg = ob_get_contents(); ob_end_clean(); $f = fopen('/vhosts/asaelectronics/euf/assets/CPM/log.txt','a');
0