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

ROQL query Contact Phone Type

Received Response
43
Views
5
Comments
edited Mar 6, 2019 7:28PM in Customer Portal 5 comments

Summary

query returns phone number but not phone type (lookupname)

Content

This is the object structure that you get from this REST resource:

https://myorg.com/services/rest/connect/v1.4/contacts/905/phones/1

{
    "number": "305582xxxx",
    "phoneType": {
        "id": 1,
        "lookupName": "Secondary Phone:"
    },
    "rawNumber": "305582xxxx",

...

I am running the following query but am getting only the rawnumber, not the lookupName

$roql_result_set = RNCPHP\ROQL::query( "SELECT Phones.* from Contact where ID = ".$id)->next();
 
while ($row = $roql_result_set->next()) {
print_r("Phone: ".$row["RawNumber"]." PhoneType = ".$row["lookupName"]." "."<br />");
    }
 
ALSO TIED
while ($row = $roql_result_set->next()) {
print_r("Phone: ".$row["RawNumber"]." PhoneType = ".$row["

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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