Initilisation script not running
Content
Hi,
Using the code snippet below in the custom script editor of a report, under the initilisation tab, the code doesn't seem to run. Any ideas why?
We have several reports like this and I can't see to debug what is happening
It runs fine on the CP. How would I go about debugging this?
Code Snippet
require_once(get_cfg_var('doc_root')."/ConnectPHP/Connect_init.php");
use RightNow\Connect\v1_3 as RNCPHP;
initConnectAPI();
for ($z = 0; $z <= 100; $z++) {
$query_string = "SELECT Misc.incident_stats FROM Misc.incident_stats LIMIT 10000";
$destroy = RNCPHP\ROQL::queryObject($query_string)-> next();
while($destroyEverything = $destroy->next()){
$destroyEverything->destroy();
}
}
Tagged:
0