• Matt Henderson
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hello Salesforce experts,

We are attempting to perform what should be an extremely simple relationship query in SOQL.  

Essentially, we are querying the "OpportunitySplit" object and attempting to obtain the firstname and lastname from the User object.  It appears that there is a child relationship from user to the opportunitySplit object, so I am assuming that this should work without too much trouble.  

The SQL that we are attempting to run is as follows:  

SELECT
 OpportunitySplit.SplitOwnerId
,OpportunitySplit.SplitAmount
,user.FirstName
,user.LastName
 
 FROM
    OpportunitySplit



This is resulting in an error stating "Failed to execute query successfully, error message was: INVALID_FIELD: ,user.FirstName.  Error at Row:4:Column2.  Didn't understand relationship 'user' in field path.  If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name."

Any insight on the best / easiest way to do this would be very appreciated.  

Thanks so much for your assistance!  

MSH
Hello Salesforce experts,

We are attempting to perform what should be an extremely simple relationship query in SOQL.  

Essentially, we are querying the "OpportunitySplit" object and attempting to obtain the firstname and lastname from the User object.  It appears that there is a child relationship from user to the opportunitySplit object, so I am assuming that this should work without too much trouble.  

The SQL that we are attempting to run is as follows:  

SELECT
 OpportunitySplit.SplitOwnerId
,OpportunitySplit.SplitAmount
,user.FirstName
,user.LastName
 
 FROM
    OpportunitySplit



This is resulting in an error stating "Failed to execute query successfully, error message was: INVALID_FIELD: ,user.FirstName.  Error at Row:4:Column2.  Didn't understand relationship 'user' in field path.  If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name."

Any insight on the best / easiest way to do this would be very appreciated.  

Thanks so much for your assistance!  

MSH