New Year Sale 2026! 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 11 Question 40 Discussion

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

A developer is developing a reusable Aura component that will reside on an sObject Lightning page with the following HTML snippet:

Caura: component implements-''forcethaaRecordid, flexipage:availableForAllPageTypes''>

Hello!

How can the component's controller get the context of the Lightning page that the sobject is an without

requiring additional best coverage?

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

0/2000 characters
Gracie
4 months ago
I feel like C could work too, but not as clean.
upvoted 0 times
...
Vonda
4 months ago
Definitely A, getSObjectType() is super reliable.
upvoted 0 times
...
Meaghan
4 months ago
Wait, can you really use force:hasSobjectName like that?
upvoted 0 times
...
Lashunda
4 months ago
Not sure about that, B seems more flexible.
upvoted 0 times
...
Ula
4 months ago
I think option D is the way to go!
upvoted 0 times
...
Rosio
5 months ago
Adding force:hasSobjectName sounds familiar, and I feel like it could simplify getting the sObject context without extra coverage.
upvoted 0 times
...
Lezlie
5 months ago
I practiced a similar question where we had to set attributes for components, but I can't recall if creating a design attribute is necessary here.
upvoted 0 times
...
Sabra
5 months ago
I think using getSObjectType() in Apex could work, but it might not be the best option since it requires more setup.
upvoted 0 times
...
Emelda
5 months ago
I remember something about using the force:hasSobjectName, but I'm not entirely sure if it's the right approach for this question.
upvoted 0 times
...
Danilo
5 months ago
Hmm, I'm a bit confused by the different router configurations shown. I'll need to make sure I understand the role of the route reflectors and how they interact with the client routers.
upvoted 0 times
...
Hana
5 months ago
This seems straightforward enough. The error message is pretty clear, so I'm going to go with checking if the agent type is set to OEM in the JAgent properties. That seems like the most likely culprit.
upvoted 0 times
...
Maile
5 months ago
The Activities component doesn't seem like the right fit for this scenario. We need to be able to show/hide buttons based on the planet's properties, and that's not really the purpose of the Activities component.
upvoted 0 times
...

Save Cancel