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

Script not working for November 2014 update

Received Response
4
Views
6
Comments
edited Jun 10, 2015 8:49AM in General Technical Discussions 6 comments

Content

Hi,

I appreciate all help. In our November 2014 update environment our incident_update script (as seen attached) is not working. The same script is working in the August 2014 release. It should be a simple script that prevents "main"-incidents to close if its "sub"-incidents is unresolved. It is as if the script is not even running. It can be deployed no problem but is not functioning, Any suggestions? 

Thanks,

Mikael

Version

November 2014

Code Snippet

             <?
/*
* CPMObjectEventHandler: incident_update
* Package: RN
* Objects: Incident
* Actions: Update
* Version: 1.2
*/
use \RightNow\Connect\v1 as RNCPHP;
use \RightNow\CPM\v1 as RNCPM;

class incident_update implements RNCPM\ObjectEventHandler
    {
    public static function apply( $run_mode, $action, $obj, $n_cycles )
        {
        try{
            // If Incident 1 status is Closed
            if($obj->StatusWithType->Status->ID==2 && $obj->CustomFields->main_incident==1 ) // If

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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