• YourApexGuy
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    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

I'm trying to store some rules in a custom object to be evaluated at runtime. So for an Account object one of the rules might be:

Type == 'Customer'

So during runtime I want to evaluate the current Account object and do something like:

String condition1 = 'Type == \'Customer\''; // would get this from the custom object instead of hardcoding

if (condition1) {
// perform some action
}

I don't think this is possible since it is not an actual boolean expression but is there an alternative method or can I build some sort of expression that will be evaluated as t/f?

Scott
Looking for a contractor or potential permanent.  Milwaukee / Waukesha area.  API, App Exchange development.
Looking for an API contractor for ad-hoc work in San Francisco.   Reply to this post if interested.

Hi

 

We are looking for a freelance developer that we can work with in helping us to develop / administer a (currently!) small application in the healthcare market.

 

thanks les