You need to sign in to do that
Don't have an account?

Standard Pricebook visibility - Summer 14 - still can't see it?
Hello. This is an old test coverage issue. Since api 24, you couldn't see the Standard Pricebook unless you used SeeAllData=true, so you couldn't write isolated test coverage. I saw that this was patched in Summer 14 (https://success.salesforce.com/ideaView?id=08730000000j9TpAAI). i'm trying to use it now, but it's not working. i run this query: Pricebook2 pb = [SELECT Id FROM Pricebook2 WHERE IsStandard = true]; - but it says that no rows are returned. (i updated the code to API 31 - although i'm not sure that was necessary. And as far as i know, the sandbox is summer 14 - image is snorkel mask and "14.")
Any idea what i am doing wrong?
thanks for your time.
chris
Any idea what i am doing wrong?
thanks for your time.
chris
Can you please create a new class with the below content and run the test class. If you get the Standard pricebookid then copy you problem class and delete it. Then create a new Class with the copied content.
For more info, Please refer the below link http://salesforcekings.blogspot.in/2014/06/how-to-insert-opportunity-record-with.html
All Answers
Can you please create a new class with the below content and run the test class. If you get the Standard pricebookid then copy you problem class and delete it. Then create a new Class with the copied content.
For more info, Please refer the below link http://salesforcekings.blogspot.in/2014/06/how-to-insert-opportunity-record-with.html