exam questions

Exam Certified Platform Developer II All Questions

View all questions & answers for the Certified Platform Developer II exam

Exam Certified Platform Developer II topic 1 question 69 discussion

Actual exam question from Salesforce's Certified Platform Developer II
Question #: 69
Topic #: 1
[All Certified Platform Developer II Questions]

A developer has been asked to create code that will meet the following requirements:
Receives input of: Map<Id, Project_c), List<Account>
Performs a potentially long-running callout to an outside web service
Provides a way to confirm that the process executed successfully
Which asynchronous feature should be used?

  • A. @future (callout=true)
  • B. Database.AllowCallouts interface
  • C. Schedulable interface
  • D. Queueable interface
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Liquad
Highly Voted 2 years, 3 months ago
1. Queueable Jobs can contain the member variable as SObjects or custom Apex Types. 2. When using queueable jobs it will make the AsyncApexJob which we can monitor like Scheduled jobs. 3. Queueable Apex can be called from the future and batch class. 4. Using Queueable Apex will chain up to queueable jobs and in Developer Edition it is only 5 Jobs.
upvoted 5 times
...
lorenac2
Most Recent 1 year ago
Selected Answer: D
So ignoring the part that B is spelled wrong, D is needed for several reasons, most already mentioned. There is a second part to this though that allows for the queueable process to be reviewed, and this is generally handled with a transaction finalizer. Trailhead: https://trailhead.salesforce.com/content/learn/modules/asynchronous_apex/async_apex_queueable Finalizers: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_transaction_finalizers.htm
upvoted 2 times
...
drwebber
2 years, 1 month ago
Selected Answer: D
It's gotta be a queue. Database.AllowsCallouts (not Database.AllowCallouts) is the correct name of the interface.
upvoted 3 times
...
Liquad
2 years, 4 months ago
Methods with the future annotation must be static methods, and can only return a void type. The specified parameters must be primitive data types, arrays of primitive data types, or collections of primitive data types. Methods with the future annotation cannot take sObjects or objects as arguments.
upvoted 4 times
...
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.

SaveCancel
Loading ...