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

queryObject not returning objects.

Accepted answer
edited Jun 10, 2016 8:19AM in Integrations and APIs 4 comments


Hi all.

I am new in Rightnow.

I have a problem. I need to update a Contact from a custom script, but I cannot get the related object to later do the save with modified data.

If I do a query like "select * from Contact where ID = 432230" I get the data, buy if I try with fetch(432230) or querObject("select Copntact from Contact where ID = 432230") I don't get the data.

What I can doing wrong?


I only see data from the last query.


Thank you  in advance.


Best regards.



Code Snippet

use RightNow\Connect\v1_2 as RNCPHP;
    require_once(get_cfg_var("doc_root") . "/ConnectPHP/Connect_init.php");
    require_once(get_cfg_var("doc_root") . '/custom/oracle/libraries/pslog-2.0.php');
    InitConnectAPI(<user>, <pass>);

echo "We must search the contact and set the value to no value.<br>";
                $query = "select ID from Contact where CustomFields.PSA.brand = 3 LIMIT 25";
                $queryResults = RNCPHP\ROQL::query($query)->next();

Howdy, Stranger!

Log In

To view full details, sign in.


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