Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - 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
29 days 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
Coral
10 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
1 days ago
I know right, sometimes the simplest solution is the best solution.
upvoted 0 times
...
Dean
5 days ago
I know right, sometimes keeping it simple is the best approach!
upvoted 0 times
...
Laurel
5 days ago
C) A for loop, with an if or if/else statement inside
upvoted 0 times
...
Cletus
7 days ago
C) A for loop, with an if or if/else statement inside
upvoted 0 times
...
Sherell
13 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
9 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
1 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
2 months ago
I agree with Tomoko, a for loop with an if or if/else statement inside makes sense.
upvoted 0 times
...
Tomoko
2 months ago
I think the developer should use option C.
upvoted 0 times
...

Save Cancel