Skip to content
This repository has been archived by the owner on Jan 27, 2024. It is now read-only.

douglascayers/sfdc-change-opportunity-pricebook-flow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Problem

Sales Reps have open opportunities and need to change the price book, such as to use latest prices. Salesforce standard behavior is to delete all existing line items when an opportunity's price book changes. Therein lies the problem, the Sales Reps don't want to rekey all their data and Management wants everyone using the newer price books.

Solution

  1. Create a flow that automates re-creating all the line items on the opportunity to reference the same products from the new price book entries while preserving the user-entered unit price, quantity, and line description.
  2. Create a visualforce page for launching the flow and overriding the standard "Choose Price Book" behavior of the button on the Opportunity Products related list.

screenshot

screenshot

screenshot

Requirements

This solution requires new Flow elements offered in the Spring '14 "Flow Trigger Pilot". Please contact Salesforce Support if you are not yet participating in the Pilot Program.

Deployment: How To

Deploy to Salesforce

To simplify deployment of this custom code to your org, you may use the github deploy tool developed by Andy Fawcett.

Once deployed, you will need to grant users access to the page as well as override the standard "Choose Price Book" action on the Opportunity Product object (Setup | Customize | Opportunities | Opportunity Products | Buttons and Links)

To deploy in your sandbox: https://githubsfdeploy-sandbox.herokuapp.com/app/githubdeploy/douglascayers/sfdc-change-opportunity-pricebook-flow

To deploy to production: https://githubsfdeploy.herokuapp.com/app/githubdeploy/douglascayers/sfdc-change-opportunity-pricebook-flow

If deploying to production via github tool fails due to tests not being run, you may opt to use Change Sets or Ant Tool or however you normally deploy your code from sandbox to production. Please use your best judgement and due diligence before making any production changes to your org.

About

Finally, a way for sales reps to change an opportunity's price book and KEEP the configured product line items.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages