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
M RafiM Rafi 

Method does not exist or incorrect signature : Test.getStandardPricebookId()

Hi all, 

Whenever i try to use the test class method 'getStandardPricebookId()'  ,im getting the error 'Method does not exist or incorrect signature'.
Any help is highly appreciated.
Thanks in advance.
Im on API version 30.
Vamsi KrishnaVamsi Krishna
Rafi
the method Test.getStandardPriceBookId() is a new method coming with Summer 14 release..
unless your sandbox has been updated to Summer 14 or you are in a pre release org, you cannot access this method..

reference:
http://docs.releasenotes.salesforce.com/en-gb/summer14/release-notes/rn_apex_price_books_in_tests.htm
Vinit_KumarVinit_Kumar
Rafi ,

As you informed that you are on API 30.0 this method does not exist in that API,it is only accessible in API 31.0 or thereafter.So,like Vamsi said you need to look for a org where the Summer'14 has already released then only you can access this method.

Hope this helps !!
Tonino TripodiTonino Tripodi
I tried to solve the same issue by upgrading to API 31.0 but the problem still remains (method does not exists). Some suggestions?
Tonino TripodiTonino Tripodi
Just fixed. my test class was still using 30.0  . Thank you all, great thread!
geeta garggeeta garg
Hi Tonino Tripodi,
How did you fixed this issue?  I am also facing this problem.
Thanks,
Geeta Garg