A Developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunityLineItem trigger. Which method allows access to the price book?
A.
Use Test.getStandardPricebookId() to get the standard price book ID.
B.
Use @IsTest(SeeAllData=true) and delete the existing standard price book.
C.
Use Test.loadData() and a Static Resource to load a standard price book.
D.
Use @TestVisible to allow the test method to see the standard price book.
It is A because Test.getStandardPriceBookid() has to be used for this purpose only.
Event id it is possible to use @isTest(SeeAllData=true) to access real data from a test Class, it is possible to read the Standard Price Book or to delete it anyway.
B is not correct, it specifically states "and DELETE the existing standard price book", which is not part of the question.
On the other hand, A is correct
B is not correct, it specifically states "and DELETE the existing standard price book", which is not part of the question.
On the other hand, A is correct
upvoted 2 times
...
...
This section is not available anymore. Please use the main Exam Page.CRT-450 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Jankovra
Highly Voted 2 years, 7 months agoNourelhouda101
Most Recent 8 months, 2 weeks agoDhakedDev
1 year agomnpatel
1 year, 4 months agochucksback
1 year, 7 months agoskhan6525
1 year, 10 months agoJankovra
2 years, 7 months agoexampletopicscom
3 years, 1 month agolmeloni91
3 years agoReyna
3 years, 1 month agolmeloni91
3 years ago