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 62 discussion

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

A developer needs to send Account records to an external system for backup purposes. The process must take a snapshot of Accounts as they are saved and then make a callout to a RESTful web service. The web service can only receive, at most, one record per call.
Which feature should be used to implement these requirements?

  • A. @future
  • B. Queueable
  • C. Process Builder
  • D. Workflow
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
Dev_Bond_ZA
Highly Voted 2 years, 2 months ago
B Explanation "Takes a snapshot of accounts as they are" - this is all accounts - cannot be process builder for that reason, can not be future either, has to be queueable so you can queue each account one after the other.
upvoted 6 times
...
vancika
Most Recent 1 month ago
Selected Answer: A
A. @future Explanation: When you need to perform a callout from within Apex—especially from a trigger—it must be done asynchronously. Using the @future annotation with the callout=true parameter enables callouts from asynchronous methods. In this scenario, each Account record's snapshot is sent to an external RESTful web service, and since the web service accepts only one record per call, the @future method can handle each Account individually in an asynchronous context. Why not B. Queueable: Queueable Apex offers additional features like job chaining and improved job handling, but these benefits are generally more useful in scenarios requiring complex processing or managing multiple related jobs. In this case, the processing is simple—making a single callout per record—so the added complexity of Queueable is unnecessary.
upvoted 1 times
...
BrainMelt12
1 month, 2 weeks ago
Selected Answer: B
B is correct: The requirement states that a snapshot of Account records must be taken as they are saved and then sent to an external system. Since Apex triggers execute synchronously, a callout cannot be made directly. However, a Queueable class allows asynchronous processing with callouts using System.enqueueJob(). Since the external system can only receive one record per call, a Queueable job is a good fit because it allows each record to be processed individually. Why C is not correct: Process Builders cannot make HTTP callouts, making them unsuitable for this requirement.
upvoted 1 times
...
doni10
5 months, 3 weeks ago
i think it is C because if you use queueable either you make a for loop through the account list but it is limited to 50 queueable Or you chain the queueable but you should find a way to know which account you have processed, it means pass the list of account throught each queueable and remove the one that is processed before pass it to the next queueable you risk to be limited without a querylocator system and i am not sur it is possible due to then depth of the queueable that is limited
upvoted 1 times
...
lucry01
7 months ago
Selected Answer: B
I go with B for the same reason as @Dev_Bond_ZA
upvoted 1 times
...
Anjindal
11 months, 2 weeks ago
Selected Answer: B
correct ans is B
upvoted 1 times
...
moitam
1 year, 8 months ago
Selected Answer: B
I go with B for the same reason as @Dev_Bond_ZA
upvoted 2 times
...
santo_aj
1 year, 11 months ago
Selected Answer: C
C is correct. Call the invocable method from process builder and from invocable method call the @future method and write your callout logic there in @future method.
upvoted 1 times
...
cPickle
2 years ago
C is right. Queustion says "The web service can only receive, at most, one record per call.". A,B can call multiple record.
upvoted 1 times
...
thneeb
2 years, 2 months ago
Selected Answer: A
For me it is A. You need to write APEX code even if you use Process Builder. So I would directly code a APEX trigger and an @future method. If Process Builder would be aber to do direct API calls, like Flow it would be fine for me. If Flow would be a choice, then I would take Flow
upvoted 2 times
...
lorenac2
2 years, 4 months ago
Selected Answer: C
This is correct as Salesforce prefers declarative first, so although @future would be used if it was a trigger, since PB is declarative, it would use this with an @InvocableMethod instead. Today, this would be done with a flow based trigger.
upvoted 1 times
...
nibbio
3 years, 5 months ago
Selected Answer: C
Process Builder + InvocableMethod marked with (callout=true)
upvoted 2 times
BrainMelt12
1 month, 2 weeks ago
This can work but it's not optimal. Process Builder runs synchronously, meaning it could slow down record operations, leading to timeouts or performance issues when making a callout for each saved Account. Process Builder cannot chain multiple jobs for retry mechanisms or future processing, which can be useful in case of failures.
upvoted 1 times
...
...
Santoshtpd
3 years, 9 months ago
C should be correct ,like Call the invocable method from process builder and from invocable method call the @future method and write your callout logic there in @future method.
upvoted 2 times
...
Pradip2021
4 years, 2 months ago
It should be A, as it will call Restful web service and it is a slow process
upvoted 1 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago