function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Suvankar Chakraborty 21Suvankar Chakraborty 21 

soql query for notes

what is SOQL Query for getting all notes(Not notes & attachment) from opportunity.
YogeshMoreYogeshMore
Hello Suvankar,
Following query help for your requirement.

List<opportunity> lstofOppWithNotesAttachment = [SELECT Id, Name,
(SELECT Id, Title FROM Notes),
(SELECT Id, Name FROM Attachments) FROM opportunity];


Regards,
YogRaj