On Account detail page i want to show all “Notes” that are related to Current account as well as notes that are releated Account—>Contacts.
So Baically is used Join with Sub query to add filter on ParentId in Account.Contact Id OR ParentId =Account.id
But when i’m running that page then getting following error:
An error occurred while attempting to perform the following SOQL query: SELECT Body,Title,ParentId,Parent.Name,Id FROM Note WHERE ((ParentId in (SELECT Id FROM Contact WHERE (((AccountId = ‘001d000001ar9NEAAY’)))))OR(ParentId = ‘001d000001ar9NEAAY’)) ORDER BY LastModifiedDate DESC LIMIT 101 Error: Semi join sub-selects are not allowed with the ‘OR’ operator
Can one one please let me know how i use OR Condition with Sub Query.