Topic by Vignesh Kasargod
Hi Friends,
I am trying to fetch the Email Address details for an Account Object using QueryObject operation.
Email Address Object being a sub object for an Account Object, I would need to request for the details in the 'ObjectTemplate' . Below is the code snippet for the same:
<v1:QueryObjects>
<v1:Query>SELECT Account FROM Account WHERE ID = 17;</v1:Query>
<v1:ObjectTemplates xmlns:ns4="urn:objects.ws.rightnow.com/v1_2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns4:Account">
<ns4:Emails/>
</v1:ObjectTemplates>
</v1:QueryObjects>
Unfortunately , this is not returning me the Email Address details.
Earlier I had tried the same approach on the Contact object as per the below code snippet:
<v1:QueryObjects>
<v1:Query>SELECT Contact FROM Contact WHERE ID = 46;</v1:Query>
<v1:ObjectTemplates xmlns:ns4="urn:objects.ws.rightnow.com/v1_2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns4:Contact">
<ns4:Emails/>
</v1:ObjectTemplates>
</v1:QueryObjects>
It worked and I was able to get the Email Address details for the Contact object.
Can any one help me to understand on why the mentioned approach is not working on the Account Object.
Regards,
Vignesh Kasargod