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

PHP Code Won't Update Incident

Received Response
edited Feb 6, 2018 9:42AM in Customer Portal 15 comments


So to make sure I wasn't losing my mind, I went and read for PHP API/RightNow Connect Object Model/Core/Incident.html

My code is below.

However, none of the incidents are updated. The output happens with the incident IDs showing, but they don't get updated.

Any reason why? I've seen posts mentioning the below but it doesn't appear in the link above. Adding the below doesn't help either.

 $inc->StatusWithType->Status = new RNCPHP\NamedIDOptList();



Code Snippet

             $res = RNCPHP\ROQL::query( "select ID from Incident where Incident.Queue.ID = 27 and Incident.StatusWithType.Status.ID=2 LIMIT 50")->next();
		while($i = $res->next()) {
			try {
				$incident = RNCPHP\Incident::fetch($i['ID']);
				$incident->StatusWithType->Status->ID = 103;
				echo "Incident ID ".$i['ID']." Updated<br>";
			catch ( \Exception $err ){
				echo "<p><b>Exception</b>: line ".__LINE__.": ".$err->getMessage()."</p>";

Howdy, Stranger!

Log In

To view full details, sign in.


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