You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Fetch Incident object in custom Models

Received Response
14
Views
2
Comments
edited May 21, 2018 6:40PM in Customer Portal 2 comments

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.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!