• Reema
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
List<Product2> listOfProducts = [SELECT Id, Name, Description, IsActive, Parent_Product__c, Account__c ,
                                   (SELECT Id, Product2Id, Quantity FROM OrderItem) FROM Product2 
                                  WHERE Account__c = 'XYZ'];

ERROR at Row:2:Column:74
Didn't understand relationship 'OrderItem' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.
  • May 14, 2021
  • Like
  • 0
List<Product2> listOfProducts = [SELECT Id, Name, Description, IsActive, Parent_Product__c, Account__c ,
                                   (SELECT Id, Product2Id, Quantity FROM OrderItem) FROM Product2 
                                  WHERE Account__c = 'XYZ'];

ERROR at Row:2:Column:74
Didn't understand relationship 'OrderItem' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.
  • May 14, 2021
  • Like
  • 0