i would like to gather pending user request callers emails using an OQL querry through the REST API
i guess the OQL querry would be like so
SELECT Person AS P JOIN UserRequest AS U ON P.id = U.caller_id WHERE U.status LIKE 'pending'
in this json post message
{"operation":"core/get","class":"Person","key":"SELECT Person AS P JOIN UserRequest AS U ON P.id = U.caller_id WHERE U.status LIKE 'pending'","output_fields":"email"}
however, i got this json error message
{"code":100,"message":"Error: Wrong format for Join clause (right hand), expecting an id - found 'caller_id' at 53 in 'SELECT Person AS P JOIN UserRequest AS U ON P.id = U.caller_id WHERE U.status LIKE 'pending'', expecting {id}, I would suggest to use ''"}
i can gather person's email based on its id (example with the id 18 person)
{"operation":"core/get","class":"Person","key":"SELECT Person WHERE id LIKE '18'","output_fields":"email"}
& i can gather pending UserRequests caller id
{"operation":"core/get","class":"UserRequest","key":"SELECT UserRequest WHERE status LIKE 'pending'","output_fields":"caller_id"}
i would like to JOIN them to gather the Person email joining its id with the UserRequest caller_id
maybe the way i want to do it is not the proper one
thank you for helping me, have a good day :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi,
i would like to gather pending user request callers emails using an OQL querry through the REST API
i guess the OQL querry would be like so
in this json post message
however, i got this json error message
i can gather person's email based on its id (example with the id 18 person)
& i can gather pending UserRequests caller id
i would like to JOIN them to gather the Person email joining its id with the UserRequest caller_id
maybe the way i want to do it is not the proper one
thank you for helping me, have a good day :)
You need to switch the IDs in the JOIN clause around. Right part is always just something like "class.id"
Try
hi
sorry for the late response...
thank you for your fix, that was it!
thank you very much, have a great day!