• RD7408
  • NEWBIE
  • 25 Points
  • Member since 2009

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

I know my question is going to be pretty simple for you veterans but can someone explain to me how relationships work in SOQL. I have looked at the documentation and the discussion boards but can not seem to understand it.

 

I want to get the following fields from the following tables:

 

Contact.FirstName,

Contact.LastName,

Account.Name,

Opportunity.Name

 

I have tried the following but it does not seem to work:

 

SELECT Contact__c.FirstName, Contact__c.LastName, Contact__c.Account__r.Name, Contact__c.Account__r.Opportunity__c.Name From Contact

 

The more I read the more confused I get.

 

I need to understand the basic concept. If someone could help I would appreciate it.

 

Robert

  • October 21, 2011
  • Like
  • 0

I am attempting to run a query from the Apex Data Loader in the Command Line mode. When I attempt to run the following query, I get the following error:

 

 

Select Opportunity.Probability, OpportunityLineItem.Quantity, PricebookEntry.ProductCode FROM Opportunity WHERE Opportunity.ID=OpportunityLineItem.OpportunityId AND OpportunityLineItem.PricebookEntryId=PricebookEntry.ID

 

 

 Error [csvAccountExtract] progress.NihilistProgressAdapter doneError <NihilistProgressAdapter.java:51> Opportunity WHERE OpportunityLineItem.OpportunityId ERROR at Row:1:Column:128

 

Any help would be greatly appreciated.

 

Thanks in advance

 

Robert

Hi all;

Very new to SalesForce but recent convert from Dynamics CRM.

I'm trying to create a contract document that includes products sold to a customer from a "won" Opportunity.

I'm not sure if it is even possible but I'm looking to bring into the one document items such as Company name/address etc, opportunity line items and products, contract number/start date/end date etc.

 

The first two (company and opportunity/product) I can do out of the box using the Office connector and running the merge on the Opportunity object. But I'm unable to bring in the contract information unless I run the merge from Contracts and then I lose the opportunity line items and products.

 

Any help is greatly appreciated.

Cheers

MM

I am attempting to run a query from the Apex Data Loader in the Command Line mode. When I attempt to run the following query, I get the following error:

 

 

Select Opportunity.Probability, OpportunityLineItem.Quantity, PricebookEntry.ProductCode FROM Opportunity WHERE Opportunity.ID=OpportunityLineItem.OpportunityId AND OpportunityLineItem.PricebookEntryId=PricebookEntry.ID

 

 

 Error [csvAccountExtract] progress.NihilistProgressAdapter doneError <NihilistProgressAdapter.java:51> Opportunity WHERE OpportunityLineItem.OpportunityId ERROR at Row:1:Column:128

 

Any help would be greatly appreciated.

 

Thanks in advance

 

Robert