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
sagar077sagar077 

Hi Everyone, , I need to Pullout the Standard Price Book value from the Product Object to Quote Line object (and want to store it in the custom field) by using customization in CPQ.

Hi Everyone,

I need to Pullout the Standard Price Book value from the Product Object to Quote Line object (and want to store it in the custom field) by using customization in CPQ..

Thanks
AnudeepAnudeep (Salesforce Developers) 

Standard price is simply a unit price from standard price book. You need to query for a pricebookentry, whose pricebook id is the id of your standard pricebook and use its unit price as a standard price
 
standardPrice = [SELECT Id, PriceBook2Id, Product2Id, UnitPrice FROM PriceBookEntry WHERE PriceBook2Id = :pricebookId LIMIT 1];

Once you have the value, you can store it in any custom field

Let me know if this helps, if it does, please mark this answer as best so that others facing the same issue will find this information useful. Thank you