B2B-Commerce-Developer Practice Test
Updated On 1-Jan-2026
211 Questions
Which option is the correct syntax to render a property in a Lightning web component template?
A. Surround the property with curly braces: {property}
B. Surround the property with brackets: [property]
C. Surround the property with an exclamation point and curly braces: {property}
D. Surround the property with curly braces and exclamation point: {{property}
Explanation:
The correct syntax to render a property in a Lightning web component
template is to surround the property with curly braces: {property}. This syntax allows you to
access the property value from the JavaScript class of the component and display it in the
HTML template. The other options are incorrect because they either use invalid characters
or do not follow the standard syntax for rendering a property in a Lightning web component
template. References: Use JavaScript Properties in Templates | Lightning Web
Components Developer Guide
Which method needs to be implemented when rendering a Salesforce B2B Commerce view in order to have it called after rendering has finished?
A. There are no methods called on the view after rendering has finished
B. onRender()
C. postRender()
D. afterRender()
Explanation:
The method that needs to be implemented when rendering a Salesforce B2B Commerce
view in order to have it called after rendering has finished is postRender. This method is an
optional hook that can be defined by the user to perform any actions or logic that depend
on the view being rendered, such as initializing widgets, binding events, or updating the
user interface. The method will be called by the render method of the CCRZ.View class,
which is the base class for all views in the framework. Salesforce References: B2B
Commerce and D2C Commerce Developer Guide, View Class
A developer is building a custom component in Lightning web components (LWC) that needs to fetch data from an API. Which lifecycle hook should the developer use to make the API call?
A. connectedCallback
B. renderedCallback
C. errorCallback
D. disconnectedCallback
Explanation:
To make an API call in a Lightning web component (LWC), a developer
should use the connectedCallback lifecycle hook. The connectedCallback lifecycle hook is
invoked when the component is inserted into the DOM. This is the ideal time to make an
API call, as the component is ready to receive and display data. Thedeveloper can use the
fetch API or a third-party library, such as axios, to make the API call and handle the
response. The renderedCallback lifecycle hook is not a good choice for making an API call,
as it is invoked every time the component is rendered or rerendered. This can cause
unnecessary or repeated API calls and affect performance. The errorCallback lifecycle
hook is not a good choice either, as it is invoked when an error occurs in the component or
in one of its children. This is not related to making an API call, but rather to handling errors.
The disconnectedCallback lifecycle hook is not a good choice either, as it is invoked when
the component is removed from the DOM. This is not a suitable time to make an API call,
as the component is no longer visible or active. Salesforce References: Lightning Web
Components Developer Guide: Lifecycle Hooks, Lightning Web Components Developer
Guide: Call an Apex Method Imperatively
Which three attributes are true regarding Subscriber pages? (3 answers)
A. Subscriber pages can include additional standard Salesforce B2B Commerce components such as featured products, category tree, and mini cart.
B. All the user interface components must be createdmanually.
C. Subscriber pages allow customers to quickly create new custom pages for their storefront.
D. Out of the Box, Subscriber Pages are completely blank HTML pages.
E. Standard Salesforce B2B Commerce components are automatically included on the page e.g. Header links, images, menu items, containers, etc.
C. Subscriber pages allow customers to quickly create new custom pages for their storefront.
D. Out of the Box, Subscriber Pages are completely blank HTML pages.
Explanation:
Three attributes that are true regarding Subscriber Pages are:
Subscriber Pages can include additional standard Salesforce B2B Commerce
components such as featured products, category tree, and mini cart. These
components can be added to the Subscriber Pages by using the
CCRZ.pagevars.pageLabels and CCRZ.pagevars.pageSections objects, which
contain the page labels and page sections that are defined in CCAdmin.
Subscriber Pages allow customers to quickly create new custom pages for their
storefront. These pages can be used to display any content or functionality that is
not available in the default pages, such as FAQs, testimonials, or promotions.
Out of the Box, Subscriber Pages are completely blank HTML pages. These pages
do not have any predefined layout or content, so the user can customize them
according to their requirements. The user can use Visualforce, HTML, CSS,
JavaScript, or any other web technologies to create their own Subscriber Pages.
Salesforce References: B2B Commerce and D2C Commerce Developer
Guide, Subscriber Pages
What are two maintainable ways that Lightning Web Components can be made mobile ready? 33m 215
A. Create a Lightning app page and add the component to the mobile navigation
B. Import a third party JavaScript library
C. Install the mobile extensions plug-in for VS Code
D. Decorate templates with mobile-ready
Explanation:
To make Lightning Web Components mobile-ready, one maintainable approach is to create
a Lightning app page and then add the component to the mobile navigation. This ensures
that the component is accessible and optimized for mobile users within the Salesforce
mobile app. Another approach is to design the component's templates with responsiveness
in mind, using CSS and layout techniques that adapt to different screen sizes. Salesforce
documentation on mobile-ready development practices provides guidelines on creating
responsive designs and optimizing components for mobile use.
| B2B-Commerce-Developer Exam Questions - Home | Previous |
| Page 7 out of 43 Pages |