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

Returning individual columns from a custom object

Accepted answer
19
Views
3
Comments
edited Jun 8, 2022 12:02PM in General Technical Discussions 3 comments

Content

I'm trying to follow the section titled "Returning individual columns from a custom object" of this guide:

 http://documentation.custhelp.com/euf/assets/devdocs/august2015/Connect_PHP/Default.htm

I have a custom object which looks like this:

I realise I can probably easily get the ID by adjusting the query but I'd rather try and fetch the ID from the results of the existing query as per the documented example.

$roql_result_set = RNCPHP\ROQL::query("SELECT * FROM CSSUser.CSSProfile WHERE CSSUser.CSSProfile.UserID = $userID")->next();
    $id = 0;
        echo("<script>console.log('$id');</script>");
        while ($roql = $roql_result_set->next()){
            $id = $roql->ID;
            echo("<script>console.log('Test');</script>");
            echo("<script>console.log('$roql->ID');</script>");
            echo("<script>console.log('$id');</script>");
        }

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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