Fetch Incident object in custom Models
Content
Hi,
I am not able to get/fetch incident from custom model file. Here is the snippet I am trying to use
namespace Custom\Models;
use RightNow\Connect\v1_3 as RNCPHP;
RightNow\Models\Base::loadModel('Incident');
class SendMail extends \RightNow\Models\Base
{
...
function getIncidentDetails($incidentId)
{
try
{
$incident = RNCPHP/Incident::fetch($incidentId);
$i_id=$incident->ID;
console.log($i_id);
console.log($subject);
c
}
catch ( \Exception $cerr ){
echo "<br><b>Exception</b>: line ".__LINE__.": ".$err->getMessage()."</br>";
}
}
}
Throws fatal error "Fatal error: Class 'Custom\Models\RightNow\Models\Base' not found" ... Can you please suggest how to fetch incident and do the insert/update record functionality.
Tagged:
0