WSC SObject handling Lookup, Child relationships and XPath queries !

This post explains how to best handle/access  primitives, lookups and child relationships, when working with Partner-Sobject compiled from Salesforce WSC WSDL complier.

For ease of explaining, a sample SOQL query that will include both a lookup and a child-relationship over Contact SObject will be used. Here is the query

/**
 * SOQL for loading contact with some fields, lookup and child relationship
*/
static String SOQL = "Select FirstName, LastName, Name, Account.Name, AccountId , (Select Id, Title, Body From Notes), (Select Id, Priority, CreatedBy.Name, CreatedById From Cases) From Contact where AccountId  != null and Id = 'recordid goes here'";

Read More: https://abhinav.fyi/wsc-sobject-handling-lookup-child-relationships-and-xpath-queries/

Abhinav Gupta

First Indian Salesforce MVP, rewarded Eight times in a row, has been blogging about Salesforce, Cloud, AI, & Web3 since 2011. Founded 1st Salesforce Dreamin event in India, called “Jaipur Dev Fest”. A seasoned speaker at Dreamforce, Dreamin events, & local meets. Author of many popular GitHub repos featured in official Salesforce blogs, newsletters, and books.

https://abhinav.fyi
Previous
Previous

Whats coming in Salesforce Chatter - Winter11 Release !

Next
Next

ApacheAxis & WSC Partner WSDL Sobject compared !