Which two scoped modules should a developer import in Lightning web components to check user permissions?
A. @salesforce/permission
B. @salesforce/customPermission
C. @salesforce/hasPermission
D. @salesforce/userPermission
Explanation:
To check user permissions in Lightning web components, a developer should
import two scoped modules: @salesforce/permission and @salesforce/customPermission.
The @salesforce/permission module allows the developer to check if the user has access
to a standard permission, such as View Setup or Modify All Data. The
@salesforce/customPermission module allows the developer to check if the user has
access to a custom permission, such as Enable Debug Mode or Manage Orders. The other
modules do not exist or are not related to user permissions. Salesforce References:
Lightning Web Components Developer Guide: Check User Permissions, Lightning Web
Components Developer Guide: Import Salesforce Modules
A user wants the pricing to reflect the price values stored in an external ERP during the checkoutflow. In what way can this requirement be satisfied?
A. Override the computePricingCart method in ccrz.cc_api_PriceAdjustoment and make the callout in this method.
B. None of the above
C. Override the computePricingReview method in ccrz.cc_CartExtension and make the callout in this method.
D. Override the computePricingCart methos in ccrz.cc_api_CartExtension and make the callout in this method.
Explanation:
To reflect the price values stored in an external ERP during the checkout flow, the
requirement can be satisfied by overriding the computePricingCart method in
ccrz.cc_api_CartExtension and making the callout in this method. This method is
responsible for computing the pricing for the cart and its line items. By overriding this
method, the user can make a callout to the external ERP and update the pricing
information accordingly. Salesforce References: B2B Commerce and D2C Commerce
What is true regarding adding more Configuration Settings to Salesforce B2B Commerce?
A. Metadata can be added to existing modules, but you cannot add new modules.
B. Configuration settings can only be extended through API's
C. Select "New"in your storefront's Configuration Settings and create a custom setting.
D. More modules and metadata can be added to Salesforce B2B Commerce.
Explanation:
More modules and metadata can be added to Salesforce B2B Commerce by creating
custom configuration settings. Configuration settings are custom settings that store various
values and parameters that affect the functionality and appearance of the storefront. They
are organized into modules, which group related settings together. To create a custom
configuration setting, the user needs to create a custom setting record in Salesforce and
specify its module, name, value, and description. The custom setting will then appear in
CCAdmin under the specified module. Salesforce References: B2B Commerce and D2C
Commerce Developer Guide, Configuration Settings
What is default behavior for how theSalesforce B2B Commerce Global APIs transform Salesforce data?
A. Fields names are returned using the Salesforce naming convention.
B. Fields names are returned with „c." prepended in their name.
C. Fields names are returned with a lowercase first letter,camelcase convention
D. Fields names can be mapped to any naming convention desired
Explanation:
The default behavior for how the Salesforce B2B Commerce Global APIs transform
Salesforce data is to return field names with a lowercase first letter, camelcase convention.
For example, the field name ccrz__E_Product__c in Salesforce will be transformed to
eProduct in the API. This is done to follow the JavaScript naming convention and to avoid
conflicts with the standard Salesforce fields and relationships. Salesforce References: B2B
Commerce and D2C Commerce Developer Guide, Query Transformation
In which three different ways can a theme be enabled in Salesforce B2B Commerce? (3 answers)
A. A Storefront setting
B. An Account Group field value
C. A per user setting
D. Account
E. Dynamically through a hook
Explanation:
A theme can be enabled in Salesforce B2B Commerce in three different ways:
A Storefront setting: The theme can be specified in the Storefront Configuration
settings in CCAdmin. This will apply the theme to all users who access the
storefront.
An Account Group field value: The theme can be specified in the Theme field of an
Account Group record in Salesforce. This will apply the theme to all users who
belong to that account group.
Dynamically through a hook: The theme can be specified dynamically by extending
the cc_hk_theme hook. This hook allows changing the theme based on various
factors, such as the user, cart, product, or storefront. For example, the hook can
apply a different theme for a specific product category or for a specific user
segment.
Which two steps are necessary to enable Salesforce B2B Commerce logging in the managed package?
A. Ensure you save a value in the Logging Token input field in the Global Settings section of CC Admin.
B. Turn On theCheckbox "Cloudcraze Logging" in CC Admin
C. Ensure the value saved in the Logging token field is appended to the ccLog query parameter.
D. Set a cookie with the Id of the user accessing the storefront in CC Admin
Explanation:
To enable Salesforce B2B Commerce logging in the managed package, you need to do
two steps. First, you need to save a value in the Logging Token input field in the Global
Settings section of CC Admin. This value can be any string that you choose, such as
“debug”. Second, you need to ensure that the value saved in the Logging token field is
appended to the ccLog query parameter in the URL of the storefront page that you want to
debug. For example, if your logging token is “debug”, then your URL should look like this:
https://my-storefront.com/?ccLog=debug. This will enable logging for that page only. You
do not need to turn on the checkbox “Cloudcraze Logging” in CC Admin, as this is an old
setting that is no longer used. You also do not need to set a cookie with the Id of the user
accessing the storefront in CC Admin, as this is not required for logging. Salesforce
References: [B2B Commerce Developer Guide: Logging]
Based on error emails flowing in, a developer suspects that recent edits made to a checkout flow have created a defect. The developer has data points available to use as inputs in reproducing the scenario. What should the developer do next?
A. Open the flow, select Debug, provide the session ID for replay, and select Run
B. Open the flow, select Attach to Live Session, provide the session ID, and select Attach.
C. Open the flow, select Debug, provide the Input values, and select Run.
D. Open the flow, select Debug with Inputs, provide the Input values, and select Run.
Explanation:
The next step that the developer should do after suspecting that recent edits made to a
checkout flow have created a defect and having data points available to use as inputs in
reproducing the scenario is to open the flow, select Debug, provide the Input values, and
select Run. A flow is a type of application that automates a business process by collecting
data and performing actions in Salesforce or an external system. A flow can be used to
customize the checkout process in the storefront by defining the steps and logic that are
executed when a customer places an order. A flow can be edited or modified using Flow
Builder, a point-and-click tool that allows developers to create and manage flows. Flow
Builder also provides debugging and testing tools that allow developers to run and
troubleshoot flows before deploying them. To debug or test a flow, the developer can open
the flow in Flow Builder, select Debug from the toolbar, provide the Input values for the flow
variables, and select Run.
This will execute the flow in debug mode, which simulates how
the flow runs in the org with real data. The developer can use debug mode to verify if the
flow works as expected or if there are any errors or issues with the flow logic or actions.
Open the flow, select Attach to Live Session, provide the session ID, and select Attach is
not a valid next step, asit is not a feature or option available in Flow Builder or Salesforce
CLI. Attach to Live Session is a feature that allows developers to attach a debugger to a
running Apex session and inspect the state of the code execution. Open the flow, select
Debug with Inputs, provide the Input values, and select Run is not a valid next step either,
as it is not a feature or option available in Flow Builder or Salesforce CLI. Debug with
Inputs is a feature that allows developers to debug an Apex class or trigger with predefined
input values and breakpoints. Open the flow, select Debug, provide the session ID for
replay, and select Run is not a valid next step either, as it is not a feature or option
available in Flow Builder or Salesforce CLI. Replay is a feature that allows developers to
replay an Apex log file and inspect the state of the code execution at each line. Salesforce
References: [B2B Commerce Developer Guide: Customize Checkout Flows], [Salesforce
Help: Flow Builder], [Salesforce Help: Debug Your Flows], [Salesforce Developer Blog:
Apex Replay Debugger]
In checkout, what event should the developer's code listen for in order to help troubleshoot and respond to actions?
A. CommerceBubbleEvents
B. CommerceErrorEvents
C. CommerceActionEvents
D. CommerceDiagnosticEvents
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
an aura:handler tag 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 References: 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
Witch static method invocation is used to initialize ccrz.cc_CallContext with information from ccrz.cc_RemoteActionContext and return an instance of ccrz.cc_RemoteActionResult in an apex @RemoteAction methos?
A. ccrz.cc_CallContext.init(ccrz.cc_RemoteActionContext)
B. ccrz.cc_CallContext.initCallContext(ccrz.cc_RemoteActionContext)
C. ccrz.cc_CallContext.initRemoteActionContext(ccrz.cc_RemoteActionContext)
D. ccrz.cc_CallContext.initializeCallContext(ccrz.cc_RemoteActionContext)
Explanation:
The static method invocation that is used to initialize ccrz.cc_CallContext with information
from ccrz.cc_RemoteActionContext and return an instance of ccrz.cc_RemoteActionResult
in an Apex @RemoteAction method is
ccrz.cc_CallContext.initCallContext(ccrz.cc_RemoteActionContext). This method takes in a
ccrz.cc_RemoteActionContext object as a parameter and returns a
ccrz.cc_RemoteActionResult object.
The ccrz.cc_RemoteActionContext object contains
information about the current storefront, user, cart, price list, currency, locale, and session.
The ccrz.cc_RemoteActionResult object contains information about the status, result, and
errors of the remote action. The other methods are not valid or do not exist. Salesforce
A developer needs to implement a custom Lightning web component (LWC) for the storefront. The LWC contains language-specific text values. How should the developer translate the text values?
A. Import static resources for the text values and add them into the LWC
B. Use a CustomLabel xml file in the LWC to add the text values there.
C. Create custom labels for the text values and import them in the LWC.
D. Create a custom Metadata object for the text values and query it in the LWC.
Explanation:
Custom labels are text values that can be translated into any language that
Salesforce supports. They are useful for displaying language-specific text in Lightning web
components. To use custom labels in a LWC, the developer needs to create them in the
Setup menu and assign them to a language and a value. Then, the developer can import
them in the LWC using the @salesforce/label scoped module. For example, if the
developer has a custom label named welcomeHeader, they can import it as follows:
import welcomeHeader from '@salesforce/label/c.welcomeHeader';
Then, they can use it in the HTML template or the JavaScript file of the LWC. For example,
in the HTML template, they can use it as follows:
HTMLAI-generated code. Review and use carefully. More info on FAQ.
{welcomeHeader}
The custom label will automatically display the translated value based on the user’s
language preference. The developer can also use the lightning-formatted-text component
to format the custom label value with HTML tags.
The other options are not correct because:
A. Importing static resources for the text values is not a recommended way to
translate text values in a LWC. Static resources are files that are stored in
Salesforce and can be referenced by applications. They are not designed for
storing language-specific text values and they do not support automatic translation
based on the user’s language preference.
B. Using a CustomLabel xml file in the LWC to add the text values there is not a
valid option. Custom labels are not stored in xml files, but in the Setup menu. They
cannot be added directly to the LWC, but they need to be imported using
the @salesforce/label scoped module.
D. Creating a custom Metadata object for the text values and querying it in the
LWC is not a feasible option. Custom Metadata objects are records that store
configuration data that can be deployed and packaged. They are not intended for
storing language-specific text values and they do not support automatic translation
based on the user’s language preference. Querying them in the LWC would also
require an Apex class and a wire service, which would add unnecessary
complexity to the solution.
References:
Use Custom Labels in Lightning Web Components
Custom Labels
Internationalizing Your Lightning Web Component (LWC)
Which two user permissions in addition to View Setup and Configuration are required to Question No : 20 Salesforce B2B-Commerce-Developer : Practice Test 17 bulk create Product data translations via Data Loader?
A. Import Custom Objects
B. B2B Commerce Super User
C. Create and set up Experiences
D. Manage Translations
Explanation:
To bulk create product data translations via Data Loader, permissions
beyond View Setup and Configuration are necessary. "Import Custom Objects" permission
is required to import bulk data into Salesforce, including translations for custom objects.
"Manage Translations" permission is essential for managing translation workbench settings
and importing/exporting translation files, which is crucial for handling product data
translations.
A developer has the task to create custom Lightning web components (LWCs). Which two steps must a developer take when creating custom LWCs?
A. Create an Apex class
B. Authorize an org for an SFDX project.
C. CloneaLWC.
D. Deploy a custom component.
Explanation:
To create custom Lightning web components (LWCs), a developer must take
two steps: authorize an org for an SFDX project and deploy a custom component.
Authorizing an org for an SFDX project allows the developer to connect to a Salesforce org,
such as a scratch org, a sandbox, or a production org, and use it as a development
environment. Deploying a custom component allows the developer to push the LWC code
from the local project to the org and make it available for use. Creating an Apex class is not
a required step for creating custom LWCs, as not all LWCs need to use Apex. Cloning an
LWC is not a required stepeither, as it is an optional way to create a new LWC based on an
existing one. Salesforce References: Lightning Web Components Developer Guide:
Authorize an Org for Development, Lightning Web Components Developer Guide: Deploy
Your Component
Page 2 out of 18 Pages |
Previous |