• Robo
  • NEWBIE
  • 0 Points
  • Member since 2013

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

I do not understand why the following exception occurs:

System.SObjectException: Invalid field Opportunity.Account.Name for Opportunity

Here is the code:

        string dynamicSql = 'select Opportunity.Account.Name from Opportunity';
        for(sObject row: Database.query(dynamicSql)) {                   
            string analyzeType = String.valueOf(row.get('Opportunity.Account.Name'));
        }


Note: I am using the Database.Query because sql is generated on the fly which can be for other tables.

  • February 14, 2013
  • Like
  • 0

For the last few days on the Force IDE when I try to deploy my files to the server I keep getting:

Save error: unable to obtain exclusive access to this record

  • February 13, 2013
  • Like
  • 0

I do not understand why the following exception occurs:

System.SObjectException: Invalid field Opportunity.Account.Name for Opportunity

Here is the code:

        string dynamicSql = 'select Opportunity.Account.Name from Opportunity';
        for(sObject row: Database.query(dynamicSql)) {                   
            string analyzeType = String.valueOf(row.get('Opportunity.Account.Name'));
        }


Note: I am using the Database.Query because sql is generated on the fly which can be for other tables.

  • February 14, 2013
  • Like
  • 0

For the last few days on the Force IDE when I try to deploy my files to the server I keep getting:

Save error: unable to obtain exclusive access to this record

  • February 13, 2013
  • Like
  • 0