ExamGecko
Home Home / Salesforce / Certified B2B Commerce Developer

Salesforce Certified B2B Commerce Developer Practice Test - Questions Answers, Page 14

Question list
Search
Search

List of questions

Search

In checkout, what event should the developer's code listen for in order to help troubleshoot and respond to actions?

A.
CommerceBubbleEvents
A.
CommerceBubbleEvents
Answers
B.
CommerceErrorEvents
B.
CommerceErrorEvents
Answers
C.
CommerceActionEvents
C.
CommerceActionEvents
Answers
D.
CommerceDiagnosticEvents
D.
CommerceDiagnosticEvents
Answers
Suggested answer: D

Explanation:

To help troubleshoot and respond to actions in checkout, the developer's code should listen for CommerceDiagnosticEvents. CommerceDiagnosticEvents is an event that is fired by Salesforce B2B Commerce when an error occurs in the storefront. CommerceDiagnosticEvents contains information about the error, such as error code, error message, error type, and error details. CommerceDiagnosticEvents can be subscribed by other components or services that want to handle or display the error information in different ways. The developer's code can listen for CommerceDiagnosticEvents using anaura:handlertag in Aura Components or an @wire decorator in Lightning web components. The developer's code can also use the event information to perform custom logic or actions based on the error, such as logging, reporting, or notifying. CommerceBubbleEvents is not an event that the developer's code should listen for in checkout, as it is not related to troubleshooting or responding to actions. CommerceBubbleEvents is an event that is fired by Salesforce B2B Commerce when a user interacts with a bubble component in the storefront. A bubble component is a user interface element that displays information or options in a pop-up window when clicked or hovered over. CommerceBubbleEvents contains information about the user interaction, such as bubble name, bubble type, and bubble value. CommerceErrorEvents is not an event that the developer's code should listen for in checkout either, as it is not related to troubleshooting or responding to actions. CommerceErrorEvents is an event that is fired by Salesforce B2B Commerce when a validation error occurs in the storefront. CommerceErrorEvents contains information about the validation error, such as field name, field label, and error message. CommerceActionEvents is not an event that the developer's code should listen for in checkout either, as it is not related to troubleshooting or responding to actions. CommerceActionEvents is an event that is fired by Salesforce B2B Commerce when a user performs an action in the storefront. CommerceActionEvents contains information about the user action, such as action name, action type, and action parameters. Salesforce

Reference:B2B Commerce Developer Guide: Handle Errors,B2B Commerce Developer Guide: Handle User Interactions with Bubble Components,B2B Commerce Developer Guide: Handle Validation Errors,B2B Commerce Developer Guide: Handle User Actions

Which two are considered discrete units of work (code units) within a transaction in the debug logs?

A.
Validation rule
A.
Validation rule
Answers
B.
Lightning component load
B.
Lightning component load
Answers
C.
Web service invocation
C.
Web service invocation
Answers
D.
Apex class
D.
Apex class
Answers
Suggested answer: C, D

Explanation:

Two data types that are considered discrete units of work (code units) within a transaction in the debug logs are web service invocation and Apex class. A discrete unit of work (code unit) is a segment of executable code that runs as part of a transaction in Salesforce. A transaction is a sequence of operations that are treated as a single unit of work and are executed under certain isolation and consistency rules. A transaction can consist of one or more discrete units of work (code units) that are executed sequentially or concurrently depending on various factors such as triggers, asynchronous calls, or limits. A debug log is a record of database operations, system processes, and errors that occur when executing a transaction or running unit tests in Salesforce. A debug log can capture information about each discrete unit of work (code unit) within a transaction, such as its start time, end time, duration, events, variables, and limits. A web service invocation is a type of discrete unit of work (code unit) that involves calling an external web service from Apex code using SOAP or REST protocols. A web service invocation can be synchronous or asynchronous depending on the method used to make the callout. A web service invocation can be captured in a debug log with its details and results. An Apex class is another type of discrete unit of work (code unit) that involves executing Apex code that defines a class with properties and methods. An Apex class can be invoked from various sources such as triggers, Visualforce pages, Lightning components, or API calls. An Apex class can be captured in a debug log with its details and results. A validation rule is not a type of discrete unit of work (code unit) within a transaction in the debug logs, as it is not a segment of executable code but rather a formula expression that defines a business rule for a field or object. A validation rule can be evaluated during a transaction and cause an error if the rule condition is not met, but it cannot be captured as a separate code unit in a debug log. A Lightning component load is not a type of discrete unit of work (code unit) within a transaction in the debug logs either, as it is not a segment of executable code but rather an event that occurs when a Lightning component is rendered on a web page or application. A Lightning component load can be measured by various performance tools such as Lightning Inspector or Lighthouse, but it cannot be captured as a separate code unit in a debug log. Salesforce

Reference: [Salesforce Developer Blog: Transactions and Request Processing], [Salesforce Help: Debug Logs], [Salesforce Developer Guide: Invoking Callouts Using Apex], [Salesforce Developer Guide: Apex Classes], [Salesforce Help: Validation Rules], [Salesforce Developer Blog: Measuring Lightning Component Performance]


A developer is on a tight timeline and needs to implement a Lightning web component which can read, create and modify single records. What is the recommended path forward?

A.
Use base components
A.
Use base components
Answers
B.
Write custom functions against a wire adapter
B.
Write custom functions against a wire adapter
Answers
C.
Create an Apex Controller
C.
Create an Apex Controller
Answers
D.
Use Lightning Data Service
D.
Use Lightning Data Service
Answers
Suggested answer: D

Explanation:

To implement a Lightning web component which can read, create and modify single records, the recommended path forward is to use Lightning Data Service. Lightning Data Service is a service that provides access to Salesforce data and metadata, cache management, and data synchronization across components. Lightning Data Service allows developers to use standard components or base components to perform CRUD (create, read, update, delete) operations on single records without writing Apex code or SOQL queries. Lightning Data Service also handles data caching, performance optimization, and conflict resolution automatically. Using base components is not a sufficient way to implement a Lightning web component which can read, create and modify single records, as base components are only user interface elements that do not provide data access or manipulation functionality by themselves. Base components need to be used with Lightning Data Service or other services to perform CRUD operations on single records. Writing custom functions against a wire adapter is not a recommended way to implement a Lightning web component which can read, create and modify single records, as it involves writing complex and error-prone JavaScript code that may not be efficient or scalable. Writing custom functions against a wire adapter also requires handling data caching, performance optimization, and conflict resolution manually. Creating an Apex controller is not a recommended way either, as it involves writing Apex code that may not be necessary or optimal for performing CRUD operations on single records. Creating an Apex controller also requires exposing Apex methods using @AuraEnabled or @RemoteAction annotations and invoking them from JavaScript code using imperative calls or promises. Salesforce

Reference:Lightning Web Components Developer Guide: Access Salesforce Data,Lightning Web Components Developer Guide: Base Components, [Lightning Web Components Developer Guide: Call Apex Methods]

A developer is working in Visual Studio Code on a previously deployed project which is rather large and deployments are time consuming. The developer wants to know if a CSS file containing small changes was actually deployed to the org. What is one way this can be accomplished?

A.
Right-click the CSS file and choose Diff File Against Org
A.
Right-click the CSS file and choose Diff File Against Org
Answers
B.
Click the Tools menu and select Diff Styles Against Org...
B.
Click the Tools menu and select Diff Styles Against Org...
Answers
C.
Right-click the folder for the component and choose Diff Styles Against Org
C.
Right-click the folder for the component and choose Diff Styles Against Org
Answers
D.
Right-click the folder for the component and choose Diff Files Against Org
D.
Right-click the folder for the component and choose Diff Files Against Org
Answers
Suggested answer: A

Explanation:

To know if a CSS file containing small changes was actually deployed to the org, one way that a developer can accomplish this is by right-clicking the CSS file and choosing Diff File Against Org. Diff File Against Org is an option that allows the developer to compare a local file with its remote version in the org using Salesforce CLI commands. The developer can use Visual Studio Code to execute these commands by right-clicking on files or folders in the project and choosing from various diff options. Right-clicking the CSS file and choosing Diff File Against Org allows the developer to see the differences between the local CSS file and the remote CSS file in the org side by side in Visual Studio Code. This way, the developer can verify if their changes were deployed successfully or not. Clicking the Tools menu and selecting Diff Styles Against Org... is not a valid way to know if a CSS file was deployed to the org, as there is no such option in Visual Studio Code or Salesforce CLI. Right-clicking the folder for the component and choosing Diff Styles Against Org is not a valid way either, as there is no such option in Visual Studio Code or Salesforce CLI. Right-clicking the folder for the component and choosing Diff Files Against Org is not a valid way either, as it will compare all the files in the folder, not just the CSS file, which may not be efficient or necessary. Salesforce

Reference: [Salesforce CLI Command Reference: force:source:diff], [Salesforce Developer Tools for Visual Studio Code]

A product is assigned to the entitlement policy but is missing from the Price Book related to the Buyer Group. The entitlement policy has View products and View prices in catalog checked.

How will the product behave on the B2B Portal?

A.
The product will not appear on the Portal but can be searched since it is part of the entitlement policy.
A.
The product will not appear on the Portal but can be searched since it is part of the entitlement policy.
Answers
B.
The product will appear on the Portal with Price Unavailable status and can also be added to the cart.
B.
The product will appear on the Portal with Price Unavailable status and can also be added to the cart.
Answers
C.
The product will not appear on the Portal and therefore cannot be added to the cart.
C.
The product will not appear on the Portal and therefore cannot be added to the cart.
Answers
D.
The product will appear on the Portal with Price Unavailable status but cannot be added to the cart.
D.
The product will appear on the Portal with Price Unavailable status but cannot be added to the cart.
Answers
Suggested answer: C

Explanation:

The product will not appear on the Portal and therefore cannot be added to the cart. A product is assigned to the entitlement policy but is missing from the Price Book related to the Buyer Group. The entitlement policy has View products and View prices in catalog checked. An entitlement policy is a set of rules that determines which products and prices a buyer group can access in the storefront. A buyer group is a group of buyers that share the same business relationship with the seller. A price book is a collection of prices for products that are available for purchase in the storefront. A product is a record that represents an item that can be sold in the storefront. To make a product visible and purchasable in the storefront, it must be assigned to both an entitlement policy and a price book that are related to the buyer group. If a product is assigned to an entitlement policy but not to a price book, it will not appear on the Portal and therefore cannot be added to the cart, regardless of the entitlement policy settings. The product will appear on the Portal with Price Unavailable status and can also be added to the cart is not a correct answer, as it contradicts the behavior of a product that is not in a price book. The product will appear on the Portal with Price Unavailable status but cannot be added to the cart is not a correct answer either, as it also contradicts the behavior of a product that is not in a price book. The product will not appear on the Portal but can be searched since it is part of the entitlement policy is not a correct answer either, as it also contradicts the behavior of a product that is not in a price book. Salesforce

Reference: [B2B Commerce Developer Guide: Entitlement Policy Object], [B2B Commerce Developer Guide: Buyer Group Object], [B2B Commerce Developer Guide: Price Book Object], [B2B Commerce Developer Guide: Product Object]

A developer exports data from an org on a standard entity which has a custom attribute. When they launch Data Loader, select the entity, click the Select All Fields button and click Finish, the custom field they added called MyCustomField_c has no values and no column header in the CSV file. What is the root cause?

A.
The user needs to install a specific Zulu JDK that is recommended by Salesforce.
A.
The user needs to install a specific Zulu JDK that is recommended by Salesforce.
Answers
B.
A mapping file was not used when the data was loaded in
B.
A mapping file was not used when the data was loaded in
Answers
C.
The user does not have access to the field
C.
The user does not have access to the field
Answers
D.
The user has rights to the field but there are no values in it
D.
The user has rights to the field but there are no values in it
Answers
Suggested answer: C

Explanation:

The root cause of why the custom field MyCustomField__c has no values and no column header in the CSV file is that the user does not have access to the field. A user's access to a field is determined by their profile and permission sets, which define their field-level security settings. Field-level security settings control whether a user can see, edit, or delete the value for a particular field on an object. If a user does not have access to a field, they will not be able to view or modify its value in any interface, including Data Loader. Data Loader is a tool that allows users to import or export data between Salesforce and CSV files. When using Data Loader to export data from an org, Data Loader will only include fields that are accessible to the user based on their field-level security settings. If a user does not have access to a field, Data Loader will not include that field in the CSV file, neither as a column header nor as a value. The user needs to install a specific Zulu JDK that is recommended by Salesforce is not the root cause of why MyCustomField__c has no values and no column header in the CSV file, as it is not related to field access or Data Loader functionality. A mapping file was not used when the data was loaded in is not the root cause either, as it is not related to field access or Data Loader functionality. A mapping file is an optional file that maps fields between Salesforce objects and CSV files when using Data Loader to import or export data. The user has rights to the field but there are no values in it is not the root cause either, as it contradicts the fact that MyCustomField__c has no column header in the CSV file. If the user had rights to the field but there were no values in it, Data Loader would still include MyCustomField__c as a column header in the CSV file, but leave its values blank. Salesforce

Reference: [Data Loader Guide: Export Data from Salesforce], [Data Loader Guide: Field Mapping], [Salesforce Help: Set Field-Level Security]

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.
Order Life Cycle Type was Managed
B.
Order Life Cycle Type was Managed
Answers
C.
The user does not have rights to some of the records
C.
The user does not have rights to some of the records
Answers
D.
The Status was still set to Draft
D.
The Status was still set to Draft
Answers
Suggested answer: D

Explanation:

The most likely cause of why some orders were missing from the Data Loader export is that the Status was still set to Draft. The Status is a field on the Order Summary object that indicates the current state of the order. The Status can have values such as Draft, Submitted, Confirmed, or Cancelled. A Draft order is an order that has not been submitted or confirmed by the customer or the seller. A Draft order is not considered a completed or valid order and is not included in reports or exports. When using Data Loader to export data from an org, Data Loader will only include orders that have a Status other than Draft, such as Submitted or Confirmed. If an order has a Status of Draft, Data Loader will not include it in the CSV file, which may result in missing orders. The export job did not fully complete is not a likely cause of why some orders were missing from the Data Loader export, as it is not related to the order status or data filtering. Order Life Cycle Type was Managed is not a likely cause either, as it is not related to the order status or data filtering. The Order Life Cycle Type is a field on the Order Summary object that indicates whether the order is managed by Salesforce Order Management or by an external system. The user does not have rights to some of the records is not a likely cause either, as it contradicts the fact that some orders were exported successfully. If the user did not have rights to some of the records, Data Loader would not be able to access or export any orders at all. Salesforce

Reference:B2B Commerce Developer Guide: Order Summary Object,B2B Commerce Developer Guide: Order Status Enum,Data Loader Guide: Export Data from Salesforce

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 developer does not have access to the object's metadata
B.
The developer does not have access to the object's metadata
Answers
C.
The field is not populated
C.
The field is not populated
Answers
D.
The user does not have rights to the custom field
D.
The user does not have rights to the custom field
Answers
Suggested answer: D

Explanation:

The root cause of why the CustomField__c field they added to the entity has no values under the header in the CSV file output is that the user does not have rights to the custom field. A user's access to a field is determined by their profile and permission sets, which define their field-level security settings. Field-level security settings control whether a user can see, edit, or delete the value for a particular field on an object. If a user does not have access to a field, they will not be able to view or modify its value in any interface, including Data Loader. Data Loader is a tool that allows users to import or export data between Salesforce and CSV files. When using Data Loader to export data from an org, Data Loader will only include fields that are accessible to the user based on their field-level security settings. If a user does not have access to a field, Data Loader will not include that field in the CSV file, neither as a column header nor as a value. The developer does not have the correct JDK that is recommended by Salesforce and this is known to cause issues with exporting custom attributes is not the root cause of why CustomField__c has no values under the header in the CSV file output, as it is not related to field access or Data Loader functionality. The developer does not have access to the object's metadata is not the root cause either, as it is not related to field access or Data Loader functionality. The object's metadata defines its structure and properties, such as fields, relationships, and layouts. The field is not populated is not the root cause either, as it contradicts the fact that CustomField__c has no column header in the CSV file output. If the field was not populated but accessible to the user, Data Loader would still include CustomField__c as a column header in the CSV file, but leave its values blank. Salesforce

Reference:Data Loader Guide: Export Data from Salesforce, [Data Loader Guide: Field Mapping], [Salesforce Help: Set Field-Level Security]

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

A.
A custom field must exist in the Cart and Order Summary objects only to be mapped successfully.
A.
A custom field must exist in the Cart and Order Summary objects only to be mapped successfully.
Answers
B.
The automatic Cart to Order mapping of custom fields can be disabled.
B.
The automatic Cart to Order mapping of custom fields can be disabled.
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.
There is a limit of 25 custom fields on a Cart that can be mapped to Order.
D.
There is a limit of 25 custom fields on a Cart that can be mapped to Order.
Answers
Suggested answer: B

Explanation:

The correct answer for what is true about mapping custom fields from Cart to Order Summary is that the automatic Cart to Order mapping of custom fields can be disabled. A custom field is a field that is added by a developer or an administrator to an object to store additional information or data. A Cart is an object that represents a collection of products and charges that a customer intends to purchase in the storefront. An Order Summary is an object that represents a confirmed purchase of products and charges by a customer in the storefront. A Cart can be converted to an Order Summary when the customer completes the checkout process and confirms their order. By default, Salesforce B2B Commerce automatically maps custom fields from Cart to Order Summary when converting a Cart to an Order Summary. This means that any custom fields that exist on both Cart and Order Summary objects with identical API names and data types will have their values copied from Cart to Order Summary during the conversion. The automatic Cart to Order mapping of custom fields can be disabled by setting the B2BCommerce.CartToOrderMappingEnabled custom setting to false. This will prevent any custom fields from being copied from Cart to Order Summary during the conversion. A custom field must exist in the Cart and Order Summary objects only to be mapped successfully is not true, as it is not the only requirement for mapping custom fields from Cart to Order Summary. The custom fields must also have identical API names and data types, and the automatic Cart to Order mapping of custom fields must be enabled. All data types are supported for custom fields to be mapped from Cart to Order is not true, as some data types are not supported for mapping custom fields from Cart to Order Summary. The supported data types are Boolean, Date, DateTime, Double, Integer, Long, Percent, String, and TextArea. There is a limit of 25 custom fields on a Cart that can be mapped to Order is not true, as there is no such limit for mapping custom fields from Cart to Order Summary. Any number of custom fields that meet the mapping requirements can be mapped from Cart to Order Summary. Salesforce

Reference: [B2B Commerce Developer Guide: Custom Field Mapping], [B2B Commerce Developer Guide: Cart Object], [B2B Commerce Developer Guide: Order Summary Object]

A developer has made some changes to the products of an existing storefront, but they are unable to see the changes in the products from the store.

Which action did the developer forget to take?

A.
Activate the product list.
A.
Activate the product list.
Answers
B.
Publish the storefront.
B.
Publish the storefront.
Answers
C.
Rebuild the search index.
C.
Rebuild the search index.
Answers
D.
Publish the catalog
D.
Publish the catalog
Answers
Suggested answer: B
Total 221 questions
Go to page: of 23