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
MellowRenMellowRen 

Missing Standard Pricebook in Sandbox

Hi

 

Anyone else having this problem since Summer 13? When I refresh our Sandbox it only copies over our Custom price books but not the Standard one. Naturally this makes some of my (fully working in Production) code just die. To top it off, you can't actually create a Standard pricebook.

 

It started happening immediately after Summer 13 was released (where they "promoted" the Pricebook object) so I assume I can't be the only victim.

 

Anyone figure out a workaround?

 

Regards

MellowRen

Advanz Knowledge SystemsAdvanz Knowledge Systems

Hi,

 

We have to see

 

  • set see all data to true
  • make sure the standard price book is active
  • add a pricebook entry for the standard price book - flag as active
  • add a pricebook entry for you test price book - flag as active

Please check this links

 

http://stackoverflow.com/questions/9164986/how-do-i-avoid-standard-price-not-defined-when-unit-testing-an-opportunitylineit

 

https://www.facebook.com/Salesforcezia/posts/108797772620644

MellowRenMellowRen

Hi

 

Thanks for the reply but in this case it is not a problem of not being able to access the Standard price book, it is a problem of it simply not existing! Seriously, ever since the update whenever I refresh the sandbox all the price books except the Standard one copy over.

 

This can be seen clearly in the UI—a list of all Price Books shows all my custom ones but no Standard. I have also run SOQL tests from the Developer Console and in code (both non-test code and test code with See All Data)—again there is no Standard Price Book.

 

BTW, before the update the Sandbox after a refresh worked fine. And my Production environment is all OK as well. 

 

I assumed that we can't be the only organisation with this bizzare problem, hence my original post, but the forums and general googling seem to suggest may be we are.

 

Sigh,

MellowRen

ericthgirwericthgirw

I'm having the same issues. my standard price book is not coming over when I refresh. Only my 2 active custom pricebooks. Since I don't have an active standard price book, I'm not able to add any products from any pricebooks. Any of the sandboxes I create, I'm not able to set as Standard Price book. Any time I try and add a product, SF thinks data has been deleted from the pricebook. 

When I open up my Dev Console and look at the Pricebook2ID, it has the ID for my Standard Price book, but the pricebook itself is missing. 

 

Im attributing this to Summer 13 release also. I have a case open with SF but I have to wait 48 hours before they get back to me. I've refreshed my sandbox 3 times now and each time I'm missing the standard price book. 

 

Pretty annoying 

JennyMJennyM

Hello

 

we have the same problem and have a case open with SFDC - it seems to be a known new issue so you are not alone. I will let you know once we have feedback - no fix or workaround to date.

 

DahveedDahveed

I refreshed my sandbox yesterday and am having the same issue. I can't select or add products as the standard pricebook is gone. I'm going to open a case as well.

 

Thanks,

 

Dahveed

MellowRenMellowRen

Ahh, hallelujah, it is great to at least know I am not alone in this.

 

Yes, I have had a case open with Salesforce since the day after the update but so far no joy—just a canned (seriously, word for word) reply every few days that they are "checking for the root cause of the issue" and that I can be "rest assured that I will be keeping you posted for any development".

 

At least this time I doubt they'll dare try and justify this as a "feature" and is "working as intended" :-)

 

Likewise, if I hear anything I'll post here. Although, presumably (hopefully) they will fix in the back end and let us all know at once.

 

I have tried a number of strange things looking for a work-around (which is slow when you can only refresh once a day and you can only "play" in Production in the late night hours). So far no luck but if anyone figures something out, let's share. Here's a list of things I have tried that do not help:

 

  1. (Attempt to) Create a new product in the Sandbox's UI.
  2. (Attempt to) Create a new product in the Sandbox using APEX code.
  3. Deactivate all the Custom PBs and refresh the Sandbox.
  4. Archive a Custom PB and refresh the Sandbox.
  5. Deactivate the Standard PB and refresh the Sandbox (yes, I was getting a bit silly and desperate).
  6. Reactivate the Standard PB and refresh the Sandbox.

 

Regards

MellowRen

 

 

 

 

MellowRenMellowRen

Hi

 

I just got this from SFDC:

 

"It is a known issue with Price Books in Sandboxes. Our Technical team has released a fix for the known issue. You may need to refresh your Sandbox again and see if the Standard Price Book will be copied and accessible."

 

I will refresh my sandbox now and see if it works.

 

Regards

MellowRen

MellowRenMellowRen

Success!

 

Salesforce have fixed it—at least it works fine for me again.

 

I refreshed my Sandbox, afterwards:

 

  1. The UI shows the Standard PB;
  2. I can add a product; and
  3. All code (including tests) now work again.

Woot, woot.

 

Hopefully it is fixed for you guys as well.

 

Regards

MellowRen

 

ericthgirwericthgirw

I followed MellowRen's lead and refreshed my sandbox. My Standard Price Book in the Sandbox has been restored in my latest refresh. 

thanks for the follow up!

DahveedDahveed
Thanks for everyone keeping up. A refresh fixed me as well.