Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Exam CRT-450 Topic 7 Question 54 Discussion

Actual exam question for Salesforce's CRT-450 exam
Question #: 54
Topic #: 7
[All CRT-450 Questions]

A developer wants to mark each Account in a List as either Active or Inactive, based on the value in the LastModified each Account being greater than 90 days in the past.

Which Apex technique should the developer use?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Robt
1 months ago
I bet the answer is C, just because it's the most obvious choice. That's how they get you in these exams, though. Always looking for the trap option.
upvoted 0 times
Fabiola
4 days ago
I think you're right, C does seem like the most logical choice.
upvoted 0 times
...
Markus
5 days ago
C) A for loop, with an if or if/else statement inside
upvoted 0 times
...
Coral
15 days ago
A) An if-else statement, with a for loop inside
upvoted 0 times
...
...
Gilma
1 months ago
What, no SOQL query to retrieve the Accounts? Come on, developers these days, always trying to reinvent the wheel!
upvoted 0 times
Colette
6 days ago
I know right, sometimes the simplest solution is the best solution.
upvoted 0 times
...
Dean
10 days ago
I know right, sometimes keeping it simple is the best approach!
upvoted 0 times
...
Laurel
11 days ago
C) A for loop, with an if or if/else statement inside
upvoted 0 times
...
Cletus
13 days ago
C) A for loop, with an if or if/else statement inside
upvoted 0 times
...
Sherell
18 days ago
A) An if-else statement, with a for loop inside
upvoted 0 times
...
Dyan
1 months ago
A) An if-else statement, with a for loop inside
upvoted 0 times
...
...
Mabel
2 months ago
I was thinking the same thing! A for loop and an if/else is the simplest and most efficient approach here.
upvoted 0 times
Kathrine
14 days ago
Exactly, it's a straightforward and effective way to achieve the desired outcome.
upvoted 0 times
...
Jacquelyne
1 months ago
And then we can easily set the Account as Active or Inactive based on the condition.
upvoted 0 times
...
Pamella
1 months ago
It will make it easy to check each Account's LastModified date.
upvoted 0 times
...
Ashley
1 months ago
I agree, using a for loop with an if/else statement is the way to go.
upvoted 0 times
...
...
Tracey
2 months ago
Hmm, a for loop with an if or if/else statement sounds like the way to go. Seems more straightforward than a switch statement or nested loops.
upvoted 0 times
Carmelina
1 months ago
C) A for loop, with an if or if/else statement inside
upvoted 0 times
...
Samira
2 months ago
A) An if-else statement, with a for loop inside
upvoted 0 times
...
...
Golda
2 months ago
I'm not sure, but I think option A could also work if implemented correctly.
upvoted 0 times
...
Shayne
3 months ago
I agree with Tomoko, a for loop with an if or if/else statement inside makes sense.
upvoted 0 times
...
Tomoko
3 months ago
I think the developer should use option C.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77