• Jyoshv
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

I'm uisng the Partner API with a small java app. I'm running the following query successfully:

 

 

select id, firstname, lastname, account.name from contact limit 1

 

 

The sobject record that is returned has all of the info that I need but it's hard to get to. The id, firstname and lastname are available using getField() but I'm having problems with account.name. I guess it's because it's a relationship? It looks like it is a child element of the Account object?

 

 

XmlObject{name={urn:partner.soap.sforce.com}records, value=null, children=[XmlObject{name={urn:sobject.partner.soap.sforce.com}type, value=Contact, children=[]}, XmlObject{name={urn:sobject.partner.soap.sforce.com}Id, value=003A0000007svGBIAY, children=[]}, XmlObject{name={urn:sobject.partner.soap.sforce.com}Id, value=003A0000007svGBIAY, children=[]}, XmlObject{name={urn:sobject.partner.soap.sforce.com}FirstName, value=Rose, children=[]}, XmlObject{name={urn:sobject.partner.soap.sforce.com}LastName, value=Gonzalez, children=[]}, XmlObject{name={urn:sobject.partner.soap.sforce.com}Account, value=null, children=[XmlObject{name={urn:sobject.partner.soap.sforce.com}type, value=Account, children=[]}, XmlObject{name={urn:sobject.partner.soap.sforce.com}Id, value=null, children=[]}, XmlObject{name={urn:sobject.partner.soap.sforce.com}Name, value=Edge Communications, children=[]}]}]}

 

 

What's the easiest way to get to the account.name value ("Edge Communications")?

 

thanks for the help. scott

Hi

I am new to sforce. i run the sample java code. i can see the infromation related to the account. and do the updates.

now i am trying to see the cases, by changing the query, (select * from cases). i am getting error.

could u please help me.

thank u

 

  • April 14, 2005
  • Like
  • 0