Which code block will accurately meet the business requirements?

A developer is asked to update data in an org based on new business rules. The new rules state that Accounts with the type set to "Customer" should have a status of "Active, " and Accounts with the type set to "Prospect" should have a status of "Pending. " No other changes to data should be made.

Which code block will accurately meet the business requirements?

A)

B)

C)

D)

A . Option A
B . Option B
C . Option C
D . Option D

Answer: D

Latest CIS-ITSM Dumps Valid Version with 434 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
1 Comment
Inline Feedbacks
View all comments
StaciCara
StaciCara
3 years ago

Answer D cannot be right. This solution will fail at the 3rd line, because you would set the ‘Pending’ status for every other type than customer. Also e.g. for ‘Agency’. Means for type ‘Customer’ you would set the status ‘Active’ correctly, but for EVERY other type (Prospect, but ALSO other types) you would set the status to ‘Pending’.

Answer B can’t be right as well, because the WHERE clause is filtering for “Status” IN the map’s keySet, means it checks for a status with values “Customer” or “Prospect” (which are the Account’s Type values). Therefore it will not return any account records to iterate over.