New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Certified Platform Developer II (Plat-Dev-301) Exam - Topic 3 Question 116 Discussion

Actual exam question for Salesforce's Salesforce Certified Platform Developer II (Plat-Dev-301) exam
Question #: 116
Topic #: 3
[All Salesforce Certified Platform Developer II (Plat-Dev-301) Questions]

A Visualforce page needs to make a callout to get billing information and tax information from two different REST endpoints. The information needs to be

displayed to the user at the same time and the return value of the billing information contains the input for the tax information callout. Each endpoint might take up to two minutes to process.

How should a developer implement the callouts?

Show Suggested Answer Hide Answer
Suggested Answer: B

Using Continuation for both callouts is the optimal solution when you have long-running callouts in a Visualforce page, as it allows the page to wait for a long-running process without tying up server resources. The Continuation pattern is specifically designed for scenarios where the request-response cycle could exceed the timeout limits. Reference: Visualforce Developer Guide -- Continuations


Contribute your Thoughts:

0/2000 characters
Miss
2 months ago
I’m leaning towards D, it makes sense to mix the methods.
upvoted 0 times
...
Lindsey
2 months ago
Wait, can a Continuation really handle that long of a wait?
upvoted 0 times
...
Luisa
3 months ago
A is definitely the way to go, it keeps things organized!
upvoted 0 times
...
Earleen
3 months ago
I disagree, I think B is more efficient for both.
upvoted 0 times
...
Alaine
3 months ago
Option A seems like the best choice for handling both callouts.
upvoted 0 times
...
Mari
3 months ago
I vaguely remember that Continuations are better for user experience with long callouts, but I’m unsure if it applies to both in this case.
upvoted 0 times
...
Dierdre
4 months ago
I feel like both endpoints need to be handled efficiently, but I can't recall if using two different methods is allowed.
upvoted 0 times
...
Melita
4 months ago
I think we practiced a similar question where we used an HTTP callout for one and a Continuation for another. Maybe that's the right approach?
upvoted 0 times
...
Jacquelyne
4 months ago
I remember we discussed using Continuations for long-running callouts, but I'm not sure if it's necessary for both endpoints here.
upvoted 0 times
...
Yaeko
4 months ago
Based on the requirements, I think option B using Continuations for both callouts might be the most efficient way to handle this. That way, the user can see the information as soon as it's available without having to wait for both callouts to complete.
upvoted 0 times
...
Fausto
4 months ago
I'm a bit confused on the differences between HTTP REST callouts and Continuations. I'll need to review those concepts before deciding on the best approach.
upvoted 0 times
...
Mariann
5 months ago
Okay, let's see. The key here is that the billing information is needed for the tax information callout, and each callout could take up to 2 minutes. I'm thinking a Continuation might be the way to go to handle the potential delays.
upvoted 0 times
...
Julian
5 months ago
Hmm, this seems like a tricky one. I'll need to think carefully about the different options and how they might work in this scenario.
upvoted 0 times
...
Leanna
7 months ago
Ah, the classic 'two-minute callout' scenario. Option A is the way to go, no doubt. Anything to avoid staring at a loading screen for four minutes.
upvoted 0 times
Wilford
5 months ago
User 2: Agreed, waiting four minutes for the information would be unbearable.
upvoted 0 times
...
Wade
5 months ago
User 1: Option A is definitely the best choice here.
upvoted 0 times
...
...
Arlene
7 months ago
Option B? Really? Continuations for both callouts? That's overkill, don't you think? I'd go with Option C and get it done in one shot.
upvoted 0 times
Carolann
5 months ago
I see your point, but I think Option C is still the way to go for simplicity.
upvoted 0 times
...
Jesusa
6 months ago
But what if the billing callout takes longer than expected? Wouldn't it be better to use Continuations for both?
upvoted 0 times
...
Joanna
7 months ago
I agree, Option C seems like the most efficient choice here.
upvoted 0 times
...
...
Casie
7 months ago
I'm leaning towards Option D. Handling the billing callout with a continuation and the tax callout with a REST callout seems like a good balance.
upvoted 0 times
...
Dick
7 months ago
Option A seems like the way to go. We don't want to wait two minutes for each callout, so a continuation for the tax callout is a smart move.
upvoted 0 times
Erin
7 months ago
Yes, it will definitely help in speeding up the process and providing a better user experience.
upvoted 0 times
...
Weldon
7 months ago
I agree, using a Continuation for the tax callout will make the process more efficient.
upvoted 0 times
...
...
Micah
7 months ago
I would go with option C, using HTTP REST callouts for both endpoints seems simpler to me.
upvoted 0 times
...
Kanisha
8 months ago
I disagree, I believe option B is more efficient as it uses Continuations for both callouts.
upvoted 0 times
...
Heidy
8 months ago
I think option A is the best choice because it allows for asynchronous processing.
upvoted 0 times
...

Save Cancel