We'd love to hear from you! Provide  feedback  to earn a badge today. Take our quick survey
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

How to delete incidents using ROQL

Accepted answer
28
Views
6
Comments
edited Nov 28, 2018 4:38PM in Integrations and APIs 6 comments

Summary

Attempting to use this code snippet to delete incident records?

Content

Hi , I was reading through the ConnectPHP guide for Oracle 18A , I want to be able to delete records using this code snippet. Would I run this from the customer portal somehow? Or am I able to log into the CLI using OPC ? 


Version

18A

Code Snippet

try{
  $ROQL = $RNCPHP."\\ROQL"; 
  $query = "delete from contact ORDER BY id desc limit 100;delete from contact ORDER BY id desc limit 100;";
    for( $i = 0; $i<100; $i++ )
     {
      query = "delete from contact ORDER BY id desc limit 100;
      $roql_rs = $ROQL::query( $query );
      $ConnectAPI::commit();
      }
}
catch (Exception $err )
{
  echo $err->getMessage();
}
Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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