Learn about Redwood and be one of the first to join the conversation

Visit Redwood Community
Issue with adding private note to the incident — Cloud Customer Connect
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

Issue with adding private note to the incident

Received Response
9
Views
1
Comments
edited Jul 8, 2018 3:40AM in Field Service 1 comment

Content

Hi Team ,

 

I need to add a text to the private note area of the incident. When the incident is getting updated.

I have figured out the coding part to make it work but not getting the exact result that I need.

Please find below the code :

 

Version

Service cloud

Code Snippet

             <?
/*
 * CPMObjectEventHandler: privateNote
 * Package: RN
 * Objects: Incident
 * Actions: Update
 * Version: 1.2
 */
use \RightNow\Connect\v1_2 as RNCPHP;

use \RightNow\CPM\v1 as RNCPM;

class privateNote
        implements RNCPM\ObjectEventHandler
{
    public static function apply( $run_mode, $action, $incident, $cycle )
    {
         if ($cycle !== 0) return;
		 
       if (RNCPM\ActionUpdate == $action)
		{
		
    $incident->Notes = new RNCPHP\NoteArray();
    $incident->Notes[0] = new RNCPHP\Note();

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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