You need to sign in to do that
Don't have an account?
Santosh Reddy9989
How to change the price book of quote ?
There are 2 pricebooks in our org. I have created one List Button using this URL:
/_ui/sales/quote/lineitem/ChooseQuotePricebook/e?id={!Quote.Id}
I am able to change the pricebook If quote didn't contain any lineitems. But when quote already have lineitems then i am getting below error.
Unable to Access Page
The value of a parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information.
Thanks,
Santosh Reddy
/_ui/sales/quote/lineitem/ChooseQuotePricebook/e?id={!Quote.Id}
I am able to change the pricebook If quote didn't contain any lineitems. But when quote already have lineitems then i am getting below error.
Unable to Access Page
The value of a parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information.
Thanks,
Santosh Reddy
You can delete the lines on the custom button click using Ajax toolkit and redirect to Pricebook Selection page. Refer below code - Hope this answers your question. Post here if you have any further questions and close this thread by marking "Best Answer" whichever helped you to resolve your problem.
Happy Coding!!
All Answers
The process eventually going to change the Pricebookd2Id on Quote. You can chane the Pricebook2Id if there are any lines associated with it. If you want to add new products to the quote from different pricebook then You need to delete all the existing lines first and insert new lines.
Hope this helps.
Happy Coding!!
When I try to change I got this alert
After pressing that Ok button i got that error message.
It was not an issue If that process deletes the existing line items. But I want to change pricebook of the quote which already have line items.
Thanks,
Santosh Reddy
You can delete the lines on the custom button click using Ajax toolkit and redirect to Pricebook Selection page. Refer below code - Hope this answers your question. Post here if you have any further questions and close this thread by marking "Best Answer" whichever helped you to resolve your problem.
Happy Coding!!