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
Sanchi9Sanchi9 

SOQL for Quote, Pricebook and PricebookEntry

Hi!

Quote has a look up with Pricebook.
PricebookEntry has a lookup with Pricebook.

I have to write a SOQL query on the Quote object to display all the PricebookEntry when a specified Pricebook is selected on the quote object. 

Any idea how this can be done?
Suraj Tripathi 47Suraj Tripathi 47
Hi Priya,
Greetings!

Please make a query on Pricebook Object to access his child objects in a single query.
Like-
SELECT Id, Name, (SELECT Id, Name FROM Quotes), (SELECT Id, Name FROM PricebookEntries) FROM Pricebook
If you find your Solution then mark this as the best answer. 

Thank you!

Regards,
Suraj Tripathi