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

Report custom script

Received Response
65
Views
2
Comments
edited Apr 5, 2019 10:14AM in Agent Desktop 2 comments

Content

Hello All,

I am using custom script in a report to update one custom field value when the report execute.

I applied my code as below what we do in php. but it not accept the RNCPHP\Incident::fetch($Incidentid);

And my roql query working fine and it return the value.

Init:

require_once(get_cfg_var('doc_root')."/ConnectPHP/Connect_init.php");
use RightNow\Connect\v1_2 as RNCPHP;
initConnectAPI();

 
 global $refno;
   $refno = $params["search_args"]["search_field0"]["val"];

 

Process Tab:

  global $refno;

 $query="Select id,AssignedTo.Account.Name as AsName from Incident where referencenumber="."'$refno'";
 $query_results = RightNow\Connect\v1_2\ROQL::query($query)->next()->next();

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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