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
ApexDevApexDev 

Add list of non-related record to Account object

Hi Experts!

We have 3 standard object in Salesforce: Account, Pricebook2 and PricebookEntry. 

Account has lookup relation to Pricebook2, and Pricebook2 has relation to PricebookEntry.

Is any possibility to create list on Account object, which will show the PricebookEntry records from right Pricebook2?

User-added image
VinayVinay (Salesforce Developers) 
Hi Andzela,

As per my understanding,  you cannot see PBE on account list view,  however you can use below query.
 
Select id, pricebook2id, product2id from priceBookEntry

https://jayakrishnasfdc.wordpress.com/2019/12/22/products-pricebooks-pricebook-entries-in-salesforce/

Please mark as Best Answer if above information was helpful.

Thanks,
ApexDevApexDev
SOLVED: I created a lookup relation on Account to Pricebook2, then I created flow which matched and filled the custom lookup field. Then I add a list component which show the Price Book Entries based on added Pricebook to Account.