ExamGecko
Home Home / Salesforce / Certified B2B Commerce Administrator

Salesforce Certified B2B Commerce Administrator Practice Test - Questions Answers, Page 20

Question list
Search
Search

List of questions

Search

How should data for Lightning web components be provided?

A.
A few properties that contain sets (objects) of data
A.
A few properties that contain sets (objects) of data
Answers
B.
A single property object that contains sets (objects) of data
B.
A single property object that contains sets (objects) of data
Answers
C.
Independent properties that take simpler, primitive values (e.g. String, Number, Boolean, Array)
C.
Independent properties that take simpler, primitive values (e.g. String, Number, Boolean, Array)
Answers
D.
One property that contains all data in one set (object)
D.
One property that contains all data in one set (object)
Answers
Suggested answer: C

Explanation:

Lightning web components use a reactive programming model, which means that the framework automatically re-renders the component when its data changes. To make this possible, the component must declare its properties as independent and simple values, such as strings, numbers, booleans, or arrays. If the component uses complex objects or sets of data as properties, the framework cannot detect the changes and the component will not update correctly. Therefore, it is recommended to use independent properties that take simpler, primitive values for Lightning web components.

How should a developer get the grand total amount, including shipping and tax, for items in the cart and in the currency of the cart, when developing a new Lightning web component for an Aura storefront cart page?

A.
{!Cart.Details.grandTotal}
A.
{!Cart.Details.grandTotal}
Answers
B.
{ICart.Totals.grand Total}
B.
{ICart.Totals.grand Total}
Answers
C.
{ICart.Details.Fields.grandTotal}
C.
{ICart.Details.Fields.grandTotal}
Answers
D.
{!Cart.Fields.grandTotal}
D.
{!Cart.Fields.grandTotal}
Answers
Suggested answer: A

Explanation:

The Aura storefront cart page uses Visualforce to render the cart information. Visualforce uses expressions to bind data from Apex controllers to the page elements. Expressions are enclosed in curly braces and can use the dot notation to access object properties. The Cart object is an instance of the ICart interface, which has a Details property that returns an ICartDetails object. The ICartDetails object has a grandTotal property that returns the grand total amount of the cart in the currency of the cart. Therefore, to get the grand total amount for items in the cart, the developer can use the expression {!Cart.Details.grandTotal} in the Lightning web component .

Which two blocks of code are needed to implement a custom getter in a Lightning web component?

A.
set rows(value) { this.state.rows = value; }
A.
set rows(value) { this.state.rows = value; }
Answers
B.
get rows() { return this.state.rows; \ }
B.
get rows() { return this.state.rows; \ }
Answers
C.
@api f set rows(value) { A this.state.rows = value; }
C.
@api f set rows(value) { A this.state.rows = value; }
Answers
D.
@api get rows() { return this.state.rows; }
D.
@api get rows() { return this.state.rows; }
Answers
Suggested answer: B, D

Explanation:

A custom getter is a JavaScript function that returns a computed value based on some logic. To implement a custom getter in a Lightning web component, we need two blocks of code: one to define the getter function with the @api decorator, and one to access the getter in the HTML template. The @api decorator makes the getter public and reactive, which means that the component re-renders when the getter value changes. The getter function must start with the keyword get, followed by the name of the property. The HTML template can access the getter value by using curly braces and the property name. For example, if we have a custom getter named rows that returns an array of data, we can define it in JavaScript as:

@api get rows() { return this.state.rows; }

And we can access it in HTML as:

{rows}

Therefore, the correct blocks of code are B and D.

A Northern Trail Qutfitters (NTO) developer made a tile component. To expose a click event and react to user input using the markup below, what should replace

<CLICK_EVENT>?

<template>

,

- <a onclick=CLICK_EVENT>

: {product.fields.Name.value}

p

: <fa>

I

1 <[template>

A.
tileClick()
A.
tileClick()
Answers
B.
{eventiileClick}
B.
{eventiileClick}
Answers
C.
javascript:void(0);tileClick();
C.
javascript:void(0);tileClick();
Answers
D.
{tileClick}
D.
{tileClick}
Answers
Suggested answer: B

Explanation:

To expose a click event and react to user input in a Lightning web component, we need to use an event handler function that is defined in the component's JavaScript file. The event handler function must have a parameter that represents the event object, which contains information about the event, such as the target element, the type of event, and any custom data. To register an event handler function in the HTML template, we need to use curly braces and the event object name as the value of the onclick attribute. For example, if we have an event handler function named tileClick that takes an event parameter, we can register it in HTML as:

The event object name can be any valid identifier, but it is a common convention to use event as the name. Therefore, the correct answer is B

A developer needs to loop through a series of child components which are tiles. What is the correct syntax for this if the child component is called appTile?

A)

B)

C)

A.
Option A
A.
Option A
Answers
B.
Option B
B.
Option B
Answers
C.
Option C
C.
Option C
Answers
Suggested answer: B

Explanation:

To loop through a series of child components which are tiles, the developer needs to use the template for:each directive, which iterates over an array and renders a nested template for each item. The developer also needs to use the for:item attribute to specify a variable name for the current item in the iteration, and the key attribute to assign a unique identifier for each item. The syntax for using the template for:each directive is:

<template for:each={items} for:item=''item'' key={item.id}> <!-- nested template --> </template>

In this case, the developer wants to loop through a series of appTile components, which are child components that display some information about an app. The developer needs to pass the app data as an attribute to the appTile component, and use the dot notation to access the app properties. The correct syntax for this is:

<template for:each={apps} for:item=''app'' key={app.id}> <c-app-tile app={app} name={app.name} rating={app.rating}></c-app-tile> </template>

Therefore, the correct answer is Option B, which matches this syntax. Option A is incorrect because it uses the wrong attribute name for:item instead of for:item. Option C is incorrect because it uses the wrong attribute name key instead of key, and it does not pass the app data as an attribute to the appTile component.

A developer needs to create a scheduled job in another system to move data into the B2B Commerce org. How can the developer do this without additional third party tools?

A.
Install a minimal set of dev tools on a machine such as the Command Line Interface (CLI) and create appropriate scripts to import files containing the data
A.
Install a minimal set of dev tools on a machine such as the Command Line Interface (CLI) and create appropriate scripts to import files containing the data
Answers
B.
Set up an SFTP server as a waystation, drop the files there using the off-platform job and schedule a job in-platform to process the file
B.
Set up an SFTP server as a waystation, drop the files there using the off-platform job and schedule a job in-platform to process the file
Answers
C.
Set up WebDAV with SFTP as a waystation, drop the files there using the off-platform job and schedule a job in-platform to process the file
C.
Set up WebDAV with SFTP as a waystation, drop the files there using the off-platform job and schedule a job in-platform to process the file
Answers
D.
Create a job in the org (on-platform) to drop a file of existing data, Use the off-platform machine to generate a file and identify the details between the two, Push the changes to the org's 'Import' directory
D.
Create a job in the org (on-platform) to drop a file of existing data, Use the off-platform machine to generate a file and identify the details between the two, Push the changes to the org's 'Import' directory
Answers
Suggested answer: B

Explanation:

To create a scheduled job in another system to move data into the B2B Commerce org, the developer can use an SFTP server as a waystation, where the off-platform job can drop the files containing the data, and then schedule a job in-platform to process the file and import or export the data. This is a common method of automating data transfers between systems without requiring additional third-party tools. The developer can use the B2C Commerce Import/Export module to create and manage jobs that import or export data using files on an SFTP server. The developer can also use Business Manager to configure and schedule jobs, as well as monitor their status and results.

Which three data types are supported for custom fields while using CSV file format for importing data for a store?

A.
Picklist (Multi-Select)
A.
Picklist (Multi-Select)
Answers
B.
Text Area (Long)
B.
Text Area (Long)
Answers
C.
Currency
C.
Currency
Answers
D.
Address
D.
Address
Answers
E.
Lookup Relationship
E.
Lookup Relationship
Answers
Suggested answer: A, B, C

Explanation:

The CSV file format for importing data for a store supports the following data types for custom fields: checkbox, currency, date, date/time, email, number, percent, phone, picklist, picklist (multiselect), text, text area, text area (long), text area (rich), time, url, or string1. Therefore, the data types that are supported among the options are picklist (multi-select), text area (long), and currency. Address and lookup relationship are not supported data types for custom fields in the CSV file format.

What is true about mapping custom fields from Cart to Order Summary?

A.
The automatic Cart to Order mapping of custom fields can be disabled.
A.
The automatic Cart to Order mapping of custom fields can be disabled.
Answers
B.
There is a limit of 25 custom fields on a Cart that can be mapped to Order.
B.
There is a limit of 25 custom fields on a Cart that can be mapped to Order.
Answers
C.
All data types are supported for custom fields to be mapped from Cart to Order.
C.
All data types are supported for custom fields to be mapped from Cart to Order.
Answers
D.
A custom field must exist in the Cart and Order Summary objects only to be mapped successfully.
D.
A custom field must exist in the Cart and Order Summary objects only to be mapped successfully.
Answers
Suggested answer: D

Explanation:

As of the Spring '23 release, the cart to order action supports the automatic mapping of custom fields as long as certain patterns are followed.To be automatically mapped, the custom field needs to exist in the Cart, Order and OrderSummary objects and have the same API name, supported data type and field configuration2. Therefore, the statement that a custom field must exist in the Cart and Order Summary objects only to be mapped successfully is false. The other statements are also false because:

The automatic Cart to Order mapping of custom fields cannot be disabled2.

There is no limit of 25 custom fields on a Cart that can be mapped to Order2.

Not all data types are supported for custom fields to be mapped from Cart to Order.Only checkbox, currency, date, date/time, email, number, percent, phone, picklist (single-select), text and url are supported2

A dev at Northern Trail Outfitters (NTO) exported Order Summary records via Data Loader, but noticed that some orders were missing. What is the most likely cause?

A.
The export job did not fully complete
A.
The export job did not fully complete
Answers
B.
The user does not have rights to some of the records
B.
The user does not have rights to some of the records
Answers
C.
Order Life Cycle Type was Managed
C.
Order Life Cycle Type was Managed
Answers
D.
The Status was still set to Draft
D.
The Status was still set to Draft
Answers
Suggested answer: B

Explanation:

One possible cause for missing orders when exporting Order Summary records via Data Loader is that the user does not have rights to some of the records. Data Loader respects the sharing and security settings of Salesforce objects and fields.Therefore, if the user does not have access to view or edit some orders or order summaries based on their profile or role permissions, those records will not be included in the export file3. The other options are not likely causes because:

If the export job did not fully complete, Data Loader would show an error message or a partial success file with the failed records3.

The Order Life Cycle Type does not affect the visibility or exportability of orders or order summaries.It only determines whether orders can be activated or deactivated4.

The Status being set to Draft does not prevent orders or order summaries from being exported.It only indicates that the order is not yet finalized4.

A developer attempts to export data from an org by launching Data Loader, selecting a standard entity, clicking the 'Select All Fields' button and clicking the Finish button. The developer finds that the CustomField__c field they added to the entity has no values under the header in the CSV file output. What is the root cause?

A.
The developer does not have the correct JDK that is recommended by Salesforce and this is ''known to cause issues with exporting custom attributes
A.
The developer does not have the correct JDK that is recommended by Salesforce and this is ''known to cause issues with exporting custom attributes
Answers
B.
The field is not populated
B.
The field is not populated
Answers
C.
The user does not have rights to the custom field
C.
The user does not have rights to the custom field
Answers
D.
The developer does not have access to the object's metadata
D.
The developer does not have access to the object's metadata
Answers
Suggested answer: C

Explanation:

One possible reason for the CustomField__c field to have no values in the CSV file output is that the user does not have rights to the custom field. Data Loader respects the sharing and security settings of Salesforce objects and fields. Therefore, if the user does not have access to view or edit the custom field based on their profile or role permissions, the field will not be included in the export file. The other options are not likely causes because:

The JDK version does not affect the export of custom fields. Data Loader requires JDK 8 or later, but it does not cause issues with exporting custom attributes.

The field being not populated would result in blank values under the header, but not the absence of the header itself.

The access to the object's metadata is not required for exporting data. Data Loader uses the SOAP API to access data, not the Metadata API.

Total 256 questions
Go to page: of 26