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
DHO_604DHO_604 

choosepricebook.jsp and not setting pricebook on quote

I have the following code that calls the standard pricebook selection page out of salesforce.  However, after selecting the pricebook, the pricebook value is saved on the opp and not the quote where this call originates from.  Can someone provide some pointers to get the pricebookid back into the quote? Cheers!

 

<apex:page standardController="Quote" extensions="ProductPicker" action="{!addPriceBookError}" >
<apex:form >

<apex:sectionheader title="Error missing Pricebook on opportunity" subtitle="{!quote.opportunity.name}" />
<apex:pageMessages /><h2>
<apex:commandlink oncomplete="window.location.href='/oppitm/choosepricebook.jsp?id {!quote.Opportunity}&retURL=%2F{!quote.id}&sUrl=%2F{!quote.id}';"  value="Select price book now" /></h2>
</apex:form>
</apex:page

Best Answer chosen by Admin (Salesforce Developers) 
DHO_604DHO_604

Got it.  Needed to call the choose pricebook page for Quotes instead.

All Answers

DHO_604DHO_604

Got it.  Needed to call the choose pricebook page for Quotes instead.

This was selected as the best answer
klr650klr650

I am having some trouble adding pricebook to a custom object. I am new to VF and trying to get something similar to what you have posted. Any chance i can get some assistance.

Mauricio OliveiraMauricio Oliveira

I am facing the same problem, can you tell me which is the 'choose pricebook page' for Quotes?

Mauricio OliveiraMauricio Oliveira

The base url I found was  "/_ui/sales/quote/lineitem/ChooseQuotePricebook/e" instead of "/oppitm/choosepricebook.jsp", with addition of id=xxxx and retUrl=mypageurl