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 B2B Commerce for Developers Accredited Professional (AP-202) Exam - Topic 1 Question 18 Discussion

What is a best practice when passing query parameters from user interface to an apex controller?
A) Query parameters should be properly sanitized by using JSINHTMLENCODE within the VisualForce Page or Component.
B) String parameters should be trimmed using String.trim().
C) Query parameters should be passed only to Salesforce B2B Commerce classes that you are extending.
D) Query parameters should be stored on a backbone model prior to passing them to the server

Salesforce B2B Commerce for Developers Accredited Professional (AP-202) Exam - Topic 1 Question 18 Discussion

Actual exam question for Salesforce's B2B Commerce for Developers Accredited Professional (AP-202) exam
Question #: 18
Topic #: 1
[All B2B Commerce for Developers Accredited Professional (AP-202) Questions]

What is a best practice when passing query parameters from user interface to an apex controller?

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

0/2000 characters
Mila
7 months ago
Wait, are we really using JSINHTMLENCODE for this? Sounds a bit overkill.
upvoted 0 times
...
Willodean
7 months ago
Passing to B2B Commerce classes? That’s a bit specific, right?
upvoted 0 times
...
Rebbecca
7 months ago
Not sure about that backbone model thing... seems unnecessary.
upvoted 0 times
...
Lizette
8 months ago
I think trimming strings is a must too.
upvoted 0 times
...
Karan
8 months ago
Definitely agree on sanitizing with JSINHTMLENCODE!
upvoted 0 times
...
Melissa
8 months ago
I vaguely recall something about query parameters being specific to certain classes, but I can't remember the details. Is that option C?
upvoted 0 times
...
Aleta
8 months ago
I'm not entirely sure, but I feel like trimming strings is important too. Maybe option B is relevant?
upvoted 0 times
...
Lauran
8 months ago
I remember we discussed sanitizing inputs in class, so I think option A makes sense.
upvoted 0 times
...
Annmarie
8 months ago
Storing parameters on a backbone model sounds familiar, but I’m not confident if that’s the best practice here. Could it be option D?
upvoted 0 times
...
Roosevelt
8 months ago
Okay, let me think this through step-by-step. First, I'll create the lock.yml file with the vault password, then define the two variables. After that, I'll create the secret.txt file as instructed.
upvoted 0 times
...
Alba
8 months ago
Wait, is it the gateway or the network interface card (NIC)? I'm a little confused on the differences between those two network components.
upvoted 0 times
...

Save Cancel