• protoguy
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 6
    Replies
Hi--
 
I'm experimenting with relationship queries using the partner wsdl.  The docs say:
 
"The partner WSDL does not contain the detailed type information available in the enterprise WSDL to get the information you need for a relationship query. You must first execute a describeSObjects call, and from the results, gather the information you need to create your relationship query:
  • The relationshipName value for one-to-many relationships, for example, in an account object, the relationship name for the asset child is Assets.
  • Use the reference fields available for the relevant object, for example, whoId, whatId, or ownerId on a lead, case, or custom object."

I can't make this into sense.  Let's make things specific so they are easier to follow.  Say I want to run one of the example queries relating accounts and contacts from the docs.  describeSObject on Account gives me a childRelationship[] that shows me that I've got one relating AccountId and Contact called "Contacts".  I confess that I don't follow what the second bullet is saying.  So how do I build this up into a query?  Where do I put my relationshipName?  It doesn't seem to be included in any of the examples. 

An example in the docs:

SELECT Id, FirstName, LastName, AccountId, Account.Name FROM Contact WHERE Account.Name LIKE ’Acme%’

I can't run this query, because I get a MALFORMED_SQL error about not being able to query relationships.

That note at the end of the doc page quote above makes me think that I can, if only I could build up the

query correctly. Any advice?

Message Edited by DevAngel on 01-10-2007 10:03 AM

Hi,

I'm having trouble using the IN statement.

As a simple example, I am trying to find info on all accounts where the billing state is AZ or CA....I used the IN statement in the following manner:

Select Id , Name , Type , ParentId , BillingStreet , BillingCity , BillingState from Account Where BillingState IN ('AZ', 'CA')

Am I using this incorrectly?

Thanks...
Hi - I'm wondering if it's possible to query for the _history_ of an opportunity. That is, if it's Stage is Closed, I'd like to know when it progressed through each of the stages...

Does that make sense? Thanks in advance for your help!
Byron
I keep thinking this should be simple, but I can not figure it out.   I am being asked what is the % of 'new business'  and the % of 'existing client' business that was won in the last 30 days. (new business and existing client are opportunity types)  I created a report that lists closed won opportunities grouped by opportunity type for the last 30 days.  When I attempt to add the 'win percentage' thru custom summary formulas...I can't get it to understand that I need it by type.  Right now I have {!WON:SUM} / {!CLOSED:SUM} as the formula.  I thought by having the report grouped by type the formula would intuitively understand I would want the answer returned by the types total. PLEASE HELP ME!
Hi,

I'm having trouble using the IN statement.

As a simple example, I am trying to find info on all accounts where the billing state is AZ or CA....I used the IN statement in the following manner:

Select Id , Name , Type , ParentId , BillingStreet , BillingCity , BillingState from Account Where BillingState IN ('AZ', 'CA')

Am I using this incorrectly?

Thanks...
Hi - I'm wondering if it's possible to query for the _history_ of an opportunity. That is, if it's Stage is Closed, I'd like to know when it progressed through each of the stages...

Does that make sense? Thanks in advance for your help!
Byron
I want to create a field that adds up the amount of all the opportunities that are connected to one account.
 
For example if we have a company called Komet. Then we have 3 opportunities connected to Komet. Let's sat they are called "Komet Opport 1", "Komet Opport 2" and "Komet Opport 3". How do I make a report that only shows the added amount per Account.
 
This is basically what I want to see in the report:
Account 1 - "amount of all opportunities belonging to the account"
Account 2 - "amount of all opportunities belonging to the account"
Account 3 - "amount of all opportunities belonging to the account"
Account 4 - "amount of all opportunities belonging to the account"
 
I DO NOT want to see the amounts of the individual opportunities at all in the report. This would prevent me from filtering Accounts on the basis of the amount because if one opportunity is worth $2 and another is worth $10 I wouldn't see these at all if the filter says "Amount=more than:10". But I want to see the Accounts that have opportunities that together are worth more than $10.
 
I need this because we need to do know how "big" our clients are. We will base this on the amount field and another custom field.
On each account we want to have a field that indicates if they are within group "SMALL CLIENTS, "MEDIUM CLIENTS or "BIG CLIENTS".
 
Can the above things be automated? Any ideas?