Halloween Special 2026! Get Up to 25% OFF Practice Questions! Limited Time - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce CCM-101 Exam - Topic 9 Question 25 Discussion

Posted by Cyril on Jul 30, 2023 at 08:56 PM

A developer is asked to write a log containing the ID and name of the product with a variable named myProduct.

Which snippet of code should be used?

Suggested Answer: A

Get Premium CCM-101 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
29 comments · newest first
CH
Chantay 11 months ago
D is definitely not it, that context function is weird.
EA
Earnestine 11 months ago
Wait, why is "producto" spelled like that?
AR
Arlene 12 months ago
C seems off, isn't it using the wrong syntax?
CH
Cherri 12 months ago
I think B is the right choice!
WY
Wynell 12 months ago
Option A looks correct to me.
DE
Delmy 1 year ago
I’m leaning towards option D, but I’m a bit confused about the context function. Wasn't there something about it in the examples we went over?
MA
Mauricio 1 year ago
I have a feeling that option C might be incorrect because I don't think template literals work with Logger.warn.
ME
Meaghan 1 year ago
I remember practicing with similar logging questions, and I feel like using placeholders like {0} is common, but I can't recall if it's the right choice here.
BR
Brett 1 year ago
I think option A looks familiar, but I'm not sure if the syntax is correct for the logging method.
EN
Enola 1 year ago
Okay, I've got this. The build tool has to be able to build the software when changes are committed, and it needs to run unit tests on the committed code. Those are the two critical characteristics I'm looking for here.
DE
Deeanna 1 year ago
Hmm, the solution seems counterintuitive. I'll need to review my SAML 2.0 knowledge to answer this.
TE
Tess 1 year ago
Haha, looks like someone forgot to spell-check 'producto' in the question. I'd go with option C just to annoy the developers.
VI
Vicente 1 year ago
I'm going with option D. It's the classic printf-style formatting with %s for the ID and name.
JE
Jesse 1 year ago
↳ replying to Vicente
I agree with option D. It's the classic way to format the log message.
AN
Annelle 1 year ago
↳ replying to Vicente
No, A is the correct one because it uses the correct syntax for logging the ID and name of the product.
ZO
Zona 1 year ago
↳ replying to Vicente
I think option A is better. It uses {0} and {1} for the ID and name.
CA
Carma 1 year ago
↳ replying to Vicente
Really? I thought D was the right choice.
JA
Javier 1 year ago
↳ replying to Vicente
Option D is incorrect. The correct answer is A.
IV
Ivory 1 year ago
↳ replying to Vicente
Option D is correct. It uses %s for the ID and name.
EL
Elinore 1 year ago
Option A looks good to me. It uses the {0} and {1} placeholders to represent the ID and name, respectively.
LO
Lorenza 1 year ago
↳ replying to Elinore
User 3: I agree, option A is the way to go.
KE
Kenia 1 year ago
↳ replying to Elinore
User 2: Yeah, option A uses the placeholders {0} and {1} for ID and name.
RE
Rebbecca 1 year ago
↳ replying to Elinore
User 1: I think option A is the correct one.
KI
Kimbery 2 years ago
I'm not sure, but C also looks like a possible option.
EV
Eva 2 years ago
I think option C is the correct one. It uses string interpolation to insert the values of myProduct.getID() and myProduct.getName() directly into the log message.
ME
Melynda 1 year ago
↳ replying to Eva
I think option A is better. It uses placeholders to insert the values of myProduct.getID() and myProduct.getName() into the log message.
PR
Providencia 1 year ago
↳ replying to Eva
I agree, option C is the correct one. It's using string interpolation for the log message.
LU
Lucy 2 years ago
I agree with Elise, A seems like the right choice.
EL
Elise 2 years ago
I think the correct answer is A.
0/2000 characters

Save Cancel