You need to sign in to do that
Don't have an account?
AMIT KUMAR 73
SOQL Query to Retrieve Price Book Name for a associated product
Hi,
I am trying to retrieve Product Name, Product code & Pricebook Name associated with a PRODUCT.
--------------------------------------------------------------------------------------------------------------------------------------------------------
Product2 productdet = [Select Id, Name, ProductCode From Product2 where id='01tA00000033x2z'];
--------------------------------------------------------------------------------------------------------------------------------------------------------
How to modify this query to associate PriceBook details this Product belongs to.
I am trying to retrieve Product Name, Product code & Pricebook Name associated with a PRODUCT.
--------------------------------------------------------------------------------------------------------------------------------------------------------
Product2 productdet = [Select Id, Name, ProductCode From Product2 where id='01tA00000033x2z'];
--------------------------------------------------------------------------------------------------------------------------------------------------------
How to modify this query to associate PriceBook details this Product belongs to.
If there are multiple product price book entry need to be mapped then you have to create a map
SELECT Name, Product2.Name, Product2.ProductCode, PriceBook2.Name from PriceBookEntry where Product2.Name = 'whatever'