Skip to content

Plat-Dev-301 Salesforce Certified Platform Developer II Practice Questions

Prepare for Plat-Dev-301 with more than an answer.

129 questions in the full set12 sample questionsUpdated Mar 12, 2026

Unlock the full exam and previous versions

  • v1Salesforce Certified Platform Developer II 129 questions Current
  • Platform Developer IILegacy Salesforce Certified Platform Developer II 251 questions Locked
Exam fee
$200 USD
Level
Advanced
Valid for
Ongoing with annual maintenance releases
Domains covered on the exam 5
  1. Advanced Developer Fundamentals15%
  2. Process Automation, Logic, and Integration27%
  3. User Interface20%
  4. Testing, Debugging, and Deployment20%
  5. Performance18%
  1. 1

    A developer uses the following command to make a callout to an external system:
    HttpRequest req = new HttpRequest();
    req.setEndpoint('callout:My_Creds/some_path');

    What must be configured in Salesforce for this code to function?

    Show answer details

    Correct answer: D

    The syntax callout:My_Creds specifically references a Named Credential with the API Name 'My_Creds'.

  2. 2

    A developer creates a Platform Event Order_Event__e to decouple the order processing logic. An external system publishes events to this bus, and an Apex Trigger subscribes to it.

    Which statement accurately describes the behavior of the Apex Trigger for Platform Events?

    Show answer details

    Correct answer: A

    Platform Event triggers are asynchronous and decoupled from the publishing transaction. Salesforce batches events for the trigger, and Trigger.new can contain up to 2,000 records (unlike the standard 200 for object triggers).

  3. 3

    A developer executes the following SOQL query in Apex:

    AggregateResult[] results = [SELECT AccountId, SUM(Amount) Total FROM Opportunity GROUP BY AccountId];
    

    How should the developer retrieve the 'Total' value from the first result?

    Show answer details

    Correct answer: A

    AggregateResult objects behave like maps. You must use the .get('Alias') method to retrieve values. Since SUM returns a number, it must be cast to Decimal (or Double/Integer depending on need, but Decimal is safest for currency).

  4. 4

    A multinational financial services firm uses a custom object Transaction__c to log highly sensitive financial data. Due to regulatory requirements, visibility to these records must be strictly controlled. The sharing model is set to Private. A requirement exists where a Transaction__c record must be shared with a specific auditor user defined in a lookup field Auditor__c on the record itself, but only when the Status__c is 'Under Review'. The auditor should have Read-Only access. The sharing logic must be automated and robust against ownership changes. Which approach is the most appropriate implementation?

    Show answer details

    Correct answer: B

    Apex Managed Sharing is required here because Criteria-Based Sharing Rules cannot target a dynamic user defined in a lookup field on the record itself (they target Groups, Roles, etc.). Apex Managed Sharing allows the creation of a __Share record with a custom RowCause (Apex Sharing Reason), which ensures the share persists even if record ownership changes, unlike manual sharing.

  5. 5

    A developer is building a global application that uses Advanced Currency Management (ACM). The application includes a custom Apex calculation service that aggregates Opportunity amounts across different regions. The developer attempts to query Opportunity records and aggregate the Amount field using GROUP BY Calendar_Year(CloseDate). However, the query fails or returns incorrect currency conversions in the aggregation. What is the technical reason for this behavior?

    Show answer details

    Correct answer: D

    This is a specific limitation of SOQL. When Advanced Currency Management (dated exchange rates) is enabled, you cannot use the convertCurrency() function in the SELECT clause if you are also using aggregate functions (like SUM or MAX) or GROUP BY clauses. The conversion logic must be handled in Apex post-query or via a different architectural approach.

  6. 6

    A logistics company uses a custom object Shipment__c with a Geolocation compound field named Delivery_Location__c. A developer needs to write an Apex trigger to identify shipments within a 10-mile radius of a warehouse. Which consideration is critical when working with this compound field in Apex?

    Show answer details

    Correct answer: A

    True: In Apex, you cannot access the compound field Delivery_Location__c directly as a single object. You must access its constituent fields, Delivery_Location__Latitude__s and Delivery_Location__Longitude__s, individually to perform calculations or logic. However, in SOQL, you can select the compound field directly.

Create an account to continue.