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 Accredited B2B Commerce Developer Professional (AP-202) Exam - Topic 3 Question 59 Discussion

Posted by Maxima on Jul 06, 2024 at 04:19 AM

A developer needs to implement specific styling for a standard component on a single page of the B2B Commerce store using an Aura template. The component should use the default style on all other pages

How should the developer implement the required changes over multiple instances?

Suggested Answer: B

In Lightning Web Components, wire adapters are used to retrieve and manipulate Salesforce data. Wire adapters abstract the underlying data access mechanism, providing a declarative way to access Salesforce data and metadata. Salesforce documentation on LWC and the @wire decorator details how wire adapters can be used to connect components to Salesforce data sources, including standard and custom objects, facilitating reactive data binding and efficient data retrieval.


Get Premium Salesforce Accredited B2B Commerce Developer Professional (AP-202) Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
37 comments · newest first
VI
Vincent 10 months ago
Wait, can you really use static resources like that? I thought they were just for scripts!
VA
Vanda 11 months ago
D could work, but I feel like it might get messy with overrides.
DE
Detra 11 months ago
C sounds interesting, but is it really necessary to create a whole new component?
ER
Erasmo 11 months ago
I disagree, B seems more flexible for future updates.
CO
Corazon 11 months ago
Option A is the way to go! Custom CSS in static resources is solid.
PR
Providencia 12 months ago
I feel like using a Custom Content Layout in option B might be a good way to manage styles, but I need to double-check how it interacts with the Aura template.
AN
Annmarie 12 months ago
I practiced a similar question where we had to apply styles conditionally, but I can't recall if the Override CSR Editor is the right choice for this scenario.
KE
Kenneth 12 months ago
I think option C sounds familiar; creating a Custom Theme Layout could help isolate the styles for that specific page.
BO
Bo 1 year ago
I remember we discussed using static resources for CSS in class, but I'm not sure if that's the best approach here.
LO
Lorean 1 year ago
I'm leaning towards option A. Importing a custom CSS file through the Experience Builder seems like the simplest solution.
ME
Merri 1 year ago
Option C seems like the most straightforward approach to me. Using a custom theme layout component should do the trick.
CA
Catalina 1 year ago
I think option B might be the way to go. Creating a custom content layout component seems like the most flexible solution.
CA
Carmen 1 year ago
Hmm, I'm a bit confused by the question. I'm not sure which approach would be the best here.
SA
Sabina 1 year ago
This looks like a tricky one. I'll need to think through the different options carefully.
AJ
Aja 1 year ago
This is a good one. I'll make sure to select all the relevant options and double-check my work before submitting the answer.
MA
Marti 1 year ago
Hmm, this is a tricky one. I'm not entirely sure about the different levels of code visibility in Operator. I'll need to think this through carefully and try to eliminate the options that don't seem quite right.
LY
Lynsey 1 year ago
Wait, we're supposed to be solving a problem here, not fighting over who can write the sickest CSS. Let's just get this done, yeah?
JO
Jodi 1 year ago
Hold up, did someone say 'custom CSS'? *rubs hands together* This is my time to shine!
NO
Noe 1 year ago
↳ replying to Jodi
C: C) Create a Custom Theme Layout Aura component that imports the custom CSS file. Set up the page to use this Theme Layout.
KE
Keneth 1 year ago
↳ replying to Jodi
A: That sounds like a good approach. It keeps the styling separate and easy to manage.
LI
Lindy 1 year ago
↳ replying to Jodi
B: B) Create a Custom Content Layout Lightning web component that imports the custom CSS file. Set up the page to use this Content Layout.
VA
Valda 1 year ago
↳ replying to Jodi
A: A) Use a Custom CSS file in a static resource and add the import using the Edit Head Markup Editor in the Experience Builder.
QU
Quiana 1 year ago
Option D seems like the quick and dirty solution, but I'm not a big fan of the Override CSR Editor. Feels a bit hacky, you know?
TE
Tequila 1 year ago
↳ replying to Quiana
C) Create a Custom Theme Layout Aura component that imports the custom CSS file. Set up the page to use this Theme Layout.
SH
Sheridan 1 year ago
↳ replying to Quiana
B) Create a Custom Content Layout Lightning web component that imports the custom CSS file. Set up the page to use this Content Layout.
FR
Freeman 1 year ago
↳ replying to Quiana
A) Use a Custom CSS file in a static resource and add the import using the Edit Head Markup Editor in the Experience Builder.
LO
Loren 1 year ago
Hmm, I'm not sure. Option B looks good too, but I'm worried it might be overkill for just a single page. Guess I'll have to think this one through a bit more.
AD
Adelaide 1 year ago
I think Option C is the way to go. Creating a Custom Theme Layout Aura component just feels like the most straightforward approach here.
AN
Anjelica 1 year ago
↳ replying to Adelaide
Option D could work too, but it might be more complicated than necessary.
DE
Deeanna 1 year ago
↳ replying to Adelaide
Yeah, using a Custom Theme Layout Aura component would keep the default style intact on other pages while applying the custom styling where needed.
CO
Colene 1 year ago
↳ replying to Adelaide
I think Option A might be simpler. Using a Custom CSS file in a static resource seems straightforward.
AS
Ashleigh 1 year ago
↳ replying to Adelaide
I agree, Option C seems like the most direct way to achieve the specific styling for that single page.
CL
Clare 1 year ago
↳ replying to Adelaide
But wouldn't Option B also work? Creating a Custom Content Layout Lightning web component could be a good alternative.
LA
Lakeesha 1 year ago
↳ replying to Adelaide
I agree, Option C seems like the most direct solution.
MA
Malcom 2 years ago
I prefer option B because creating a Custom Content Layout Lightning web component provides more flexibility in styling.
PE
Pearly 2 years ago
I agree with Lashaunda, option A seems like the most efficient way to implement the required changes.
LA
Lashaunda 2 years ago
I think option A is the best choice because it allows for easy management of the custom CSS file.
0/2000 characters

Save Cancel