Activity Forums Salesforce® Discussions How to solve the below error in Salesforce?

  • How to solve the below error in Salesforce?

    Posted by Deepak on October 30, 2020 at 3:32 pm

    System.SObjectException: Invalid relationship Name for Product2

    Aditya replied 4 years ago 2 Members · 1 Reply
  • 1 Reply
  • Aditya

    Member
    November 2, 2020 at 6:04 am

    Hi,Use the below code:string dynamicSql = 'select Name,Account.Name from Opportunity';for(Opportunity row: Database.query(dynamicSql)) {string analyzeType = String.valueOf(row.Account.Name);System.debug('analyzeType************ :'+analyzeType);}

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos