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 Certified Platform Developer II (Plat-Dev-301) Exam - Topic 10 Question 60 Discussion

Consider the following code snippet:Which two steps should the developer take to add flexibility to change the endpolnt and credentials without needing to modify code?Choose 2 answers
A) Create a Named Credential, endPoint_NC, to store the endpoint and credentials. and C) Use req.setEndpoint(,callcut:endPoint_NC,); within the callout request.
B) Store the URL of the endpoint in a custom Label named endPointURL.
D) Use req.setEndpoint(Label.endPointURL);.

Salesforce Certified Platform Developer II (Plat-Dev-301) Exam - Topic 10 Question 60 Discussion

Actual exam question for Salesforce's Salesforce Certified Platform Developer II (Plat-Dev-301) exam
Question #: 60
Topic #: 10
[All Salesforce Certified Platform Developer II (Plat-Dev-301) Questions]

Consider the following code snippet:

Which two steps should the developer take to add flexibility to change the endpolnt and credentials without needing to modify code?

Choose 2 answers

Show Suggested Answer Hide Answer
Suggested Answer: A, C

Contribute your Thoughts:

0/2000 characters
Rose
7 months ago
Not sure about B, seems a bit limiting compared to A.
upvoted 0 times
...
Elbert
7 months ago
Wait, can you really change the endpoint without touching the code?
upvoted 0 times
...
Olive
7 months ago
Definitely A and D! Makes it super easy to update.
upvoted 0 times
...
Coral
8 months ago
I think C is also a good choice, but not as flexible.
upvoted 0 times
...
Chaya
8 months ago
A and B are the best options for flexibility.
upvoted 0 times
...
Iola
8 months ago
I vaguely recall that using Labels can make things easier, but I’m not confident if it’s as flexible as Named Credentials for changing endpoints.
upvoted 0 times
...
Yolande
8 months ago
I practiced a similar question where we had to set endpoints dynamically. I think using req.setEndpoint with Named Credentials could be the right approach.
upvoted 0 times
...
Dawne
8 months ago
I'm a bit unsure if using custom Labels is the best practice for this. I think it might work, but I feel like Named Credentials are more secure.
upvoted 0 times
...
Demetra
8 months ago
I remember we discussed Named Credentials in class; they seem like a solid option for managing endpoints and credentials.
upvoted 0 times
...
Claudio
8 months ago
Okay, let's see. The key here is understanding how the data is being updated, so I'll focus on analyzing the different update mechanisms mentioned.
upvoted 0 times
...
Cecil
8 months ago
This seems straightforward enough. I think I've got a good handle on XML syntax, so I should be able to identify the issue here.
upvoted 0 times
...

Save Cancel