Month End Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

Salesforce Certified Platform Developer II ( Plat-Dev-301 ) PDII Question # 37 Topic 4 Discussion

Salesforce Certified Platform Developer II ( Plat-Dev-301 ) PDII Question # 37 Topic 4 Discussion

PDII Exam Topic 4 Question 37 Discussion:
Question #: 37
Topic #: 4

A developer needs to implement a system audit feature that allows users, assigned to a custom profile named "Auditors", to perform searches against the historical records in the Account object. The developer must ensure the search is able to return history records that are between 6 and 12 months old. Given the code below, which select statement should be inserted as a valid way to retrieve the Account History records?4445

Java

Date initialDate = System.Today().addMonths(-12);

Date endDate = System.Today().addMonths(-6);

// Insert SELECT statement here


A.

[SELECT AccountId, CreatedDate, Field, NewValue, OldValue FROM Account_History WHERE CreatedDate <= :initialDate AND CreatedDate <= :endDate];


B.

[SELECT AccountId, CreatedDate, Field, NewValue, OldValue FROM Account_History WHERE CreatedDate >= :endDate AND CreatedDate <= :initialDate];


C.

[SELECT AccountId, CreatedDate, Field, NewValue, OldValue FROM AccountHistory WHERE CreatedDate BETWEEN :initialDate AND :endDate];


D.

[SELECT AccountId, CreatedDate, Field, NewValue, OldValue FROM AccountHistory WHERE CreatedDate => :initialDate AND CreatedDate <= :endDate];


Get Premium PDII Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.