ExamGecko
Home Home / Salesforce / Certified B2B Commerce Developer

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

Question list
Search
Search

What are three advantages of using ccLog over the Salesforce standard System.debug class? (3 answers)

A.
There is no need to use string concatenation to easily tag log statements with a subject.
A.
There is no need to use string concatenation to easily tag log statements with a subject.
Answers
B.
ccLog can debug syntax errors found in the JavaScript.
B.
ccLog can debug syntax errors found in the JavaScript.
Answers
C.
There is no need to create a User Trace Flag.
C.
There is no need to create a User Trace Flag.
Answers
D.
Append #ccLog=<Logging Token Name> to the end of the storefront URL in order to get logs in the inspector console.
D.
Append #ccLog=<Logging Token Name> to the end of the storefront URL in order to get logs in the inspector console.
Answers
E.
There is no need to manually set a cookie to debug with the Site Guest User.
E.
There is no need to manually set a cookie to debug with the Site Guest User.
Answers
Suggested answer: A, D, E

Explanation:

Three advantages of using ccLog over the Salesforce standard System.debug class are:

There is no need to use string concatenation to easily tag log statements with a subject. ccLog allows passing a subject parameter to the log method, which will prepend the subject to the log message. For example,ccLog.log('This is a message', 'Subject')will log[Subject] This is a message.

There is no need to create a User Trace Flag. ccLog can be enabled by setting the value of CO.logToken to true in CCAdmin, which will activate logging for all users who access the storefront.

There is no need to manually set a cookie to debug with the Site Guest User. ccLog can be enabled for the Site Guest User by appending #ccLog=<Logging Token Name> to the end of the storefront URL in order to get logs in the inspector console. For example,https://my-storefront.com/#ccLog=debugwill enable logging for the Site Guest User with the debug level. Salesforce

Reference:B2B Commerce and D2C Commerce Developer Guide,Logging

What are three ways to implement custom post Order processing? (3 answers)

A.
Use a Salesforce workflow rule that executes when an Order record is created.
A.
Use a Salesforce workflow rule that executes when an Order record is created.
Answers
B.
Extend cc_hk_invoice tohandle custom business logic post Order processing
B.
Extend cc_hk_invoice tohandle custom business logic post Order processing
Answers
C.
Use cc_hk_Order.placeTarget to define a new Order Confirmation page which executes additional business logic.
C.
Use cc_hk_Order.placeTarget to define a new Order Confirmation page which executes additional business logic.
Answers
D.
Modify or add custom Cart formula fields to handle logic.
D.
Modify or add custom Cart formula fields to handle logic.
Answers
E.
Use Process builder to implement business processes that execute when an Order record is created.
E.
Use Process builder to implement business processes that execute when an Order record is created.
Answers
Suggested answer: B, C, E

Explanation:

Three ways to implement custom post Order processing are:

Extend cc_hk_invoice to handle custom business logic post Order processing. This hook allows modifying the invoice data or performing additional actions after an Order is placed. For example, the hook can send an email notification or update a custom field on the invoice record.

Use cc_hk_Order.placeTarget to define a new Order Confirmation page which executes additional business logic. This hook allows specifying a custom Visualforce page that will be displayed after an Order is placed. The custom page can include additional business logic or user interface elements.

Use Process Builder to implement business processes that execute when an Order record is created. Process Builder is a tool that allows creating workflows and actions based on criteria and conditions. For example, Process Builder can create a task, send an email, or update a record when an Order record is created. Salesforce

Reference:B2B Commerce and D2C Commerce Developer Guide,Hooks, Process Builder

What are three ways to test the value of Page Label on any Salesforce B2B Commerce Community Page? (3 answers)

A.
Access the source HTML for the page viathe browser developer tools.
A.
Access the source HTML for the page viathe browser developer tools.
Answers
B.
Execute CCRZ.pagevars.pageLabels['PAGE_LABEL_NAME') in the JavaScript console.
B.
Execute CCRZ.pagevars.pageLabels['PAGE_LABEL_NAME') in the JavaScript console.
Answers
C.
Execute CCRZ.processPageLabelMap('PAGE_LABEL_NAME') in the JavaScript console.
C.
Execute CCRZ.processPageLabelMap('PAGE_LABEL_NAME') in the JavaScript console.
Answers
D.
Enable the 'display page label names' in cc admin.
D.
Enable the 'display page label names' in cc admin.
Answers
E.
Execute (('PAGE_LABEL_NAME')) in the JavaScript console
E.
Execute (('PAGE_LABEL_NAME')) in the JavaScript console
Answers
Suggested answer: B, C, D

Explanation:

Three ways to test the value of Page Label on any Salesforce B2B Commerce Community Page are:

Execute CCRZ.pagevars.pageLabels['PAGE_LABEL_NAME'] in the JavaScript console. This will return the value of the page label with the given name from the pagevars object, which contains all the page labels that are used on the page.

Execute CCRZ.processPageLabelMap('PAGE_LABEL_NAME') in the JavaScript console. This will return the value of the page label with the given name from the pageLabelMap object, which contains all the page labels that are defined in CCAdmin.

Enable the 'display page label names' in cc admin. This will display the name of each page label next to its value on the storefront pages, which can help identify and verify the page labels. Salesforce

Reference:B2B Commerce and D2C Commerce Developer Guide,Page Labels

What are two guidelines for logging that are used within the core Salesforce

B2B Commerce product? (2 answers)

A.
Items or data within computational intensive loops shouldbe logged.
A.
Items or data within computational intensive loops shouldbe logged.
Answers
B.
The close method of ccrz.ccLog must be called at the end of the remote action.
B.
The close method of ccrz.ccLog must be called at the end of the remote action.
Answers
C.
No calls to ccrz.ccLog can be made before cc_CallContext.initRemoteContext is executed.
C.
No calls to ccrz.ccLog can be made before cc_CallContext.initRemoteContext is executed.
Answers
D.
It is okay to log any data on the server that is already logged on the client side.
D.
It is okay to log any data on the server that is already logged on the client side.
Answers
Suggested answer: B, C

Explanation:

Two guidelines for logging that are used within the core Salesforce B2B Commerce product are:

The close method of ccrz.ccLog must be called at the end of the remote action. This method will flush the log messages to the browser console or to a custom object, depending on the logging mode. If this method is not called, the log messages may not be displayed or saved properly.

No calls to ccrz.ccLog can be made before cc_CallContext.initRemoteContext is executed. This method will initialize the call context object, which contains information such as the current user, cart, storefront, and configuration settings. These information are required for logging, so calling ccrz.ccLog before initializing the call context will result in an error. Salesforce

Reference:B2B Commerce and D2C Commerce Developer Guide,Logging

What is a best practice when passing query parameters from user interface to an apex controller?

A.
Query parameters should be properly sanitized by using JSINHTMLENCODE within the VisualForce Page or Component.
A.
Query parameters should be properly sanitized by using JSINHTMLENCODE within the VisualForce Page or Component.
Answers
B.
String parameters should be trimmed using String.trim().
B.
String parameters should be trimmed using String.trim().
Answers
C.
Query parameters should be passed only to Salesforce B2B Commerce classes that you are extending.
C.
Query parameters should be passed only to Salesforce B2B Commerce classes that you are extending.
Answers
D.
Query parameters should be stored on a backbone model prior to passing them to the server
D.
Query parameters should be stored on a backbone model prior to passing them to the server
Answers
Suggested answer: A

Explanation:

A best practice when passing query parameters from user interface to an apex controller is to query parameters should be properly sanitized by using JSINHTMLENCODE within the VisualForce Page or Component. This function will encode any special characters in the query parameters to prevent cross-site scripting (XSS) attacks or SOQL injection attacks. For example,ccrz.ccRemoteActions.getProducts('{!JSINHTMLENCODE(searchTerm)}')will encode the searchTerm parameter before passing it to the apex controller. Salesforce

Reference:B2B Commerce and D2C Commerce Developer Guide,Security

What is a method to resolve if the current storefront customer is a Salesforce B2B Commerce guest user in an apex class?

A.
ccrz.cc_CallContext.currUser.isGuest
A.
ccrz.cc_CallContext.currUser.isGuest
Answers
B.
ccrz.cc_CallContext.isGuest
B.
ccrz.cc_CallContext.isGuest
Answers
C.
UserInfo.getUserType()
C.
UserInfo.getUserType()
Answers
D.
... UserType
D.
... UserType
Answers
Suggested answer: B

Explanation:

A method to resolve if the current storefront customer is a Salesforce B2B Commerce guest user in an apex class is to use ccrz.cc_CallContext.isGuest. This property will return true if the current user is a guest user, or false otherwise. For example,if(ccrz.cc_CallContext.isGuest){ // do something for guest user }will execute some logic only for guest users. Salesforce

Reference:B2B Commerce and D2C Commerce Developer Guide,Call Context

What is a valid way of referencing the CC Cart Object whose API name is E_Cart__c in a SOQL query?

A.
_Cart__c
A.
_Cart__c
Answers
B.
c.E_Cart__c
B.
c.E_Cart__c
Answers
C.
ccrz__E_Cart__c
C.
ccrz__E_Cart__c
Answers
D.
cloudcraze__E_Cart__c
D.
cloudcraze__E_Cart__c
Answers
Suggested answer: C

Explanation:

A valid way of referencing the CC Cart Object whose API name is E_Cart__c in a SOQL query is to use ccrz__E_Cart__c. This is the transformed name of the object that is used by the Salesforce B2B Commerce framework. All custom objects and fields that are part of the cloudcraze managed package have the prefix ccrz__ in their API names. For example,SELECT Id, Name FROM ccrz__E_Cart__cwill query the CC Cart Object records. Salesforce

Reference:B2B Commerce and D2C Commerce Developer Guide,Query Transformation

What is a valid way of referencing the global cc_api_CartExtentsion apex class via subscriber code?

A.
ccrz__cc_api_CartExtension
A.
ccrz__cc_api_CartExtension
Answers
B.
c__cc_api_CartExtension
B.
c__cc_api_CartExtension
Answers
C.
cloudcraze.cc_api_CartExtension
C.
cloudcraze.cc_api_CartExtension
Answers
D.
ccrz.cc_api_CartExtension
D.
ccrz.cc_api_CartExtension
Answers
Suggested answer: D

Explanation:

A valid way of referencing the global cc_api_CartExtension apex class via subscriber code is to use ccrz.cc_api_CartExtension. This is the name of the class that is defined in the cloudcraze managed package. The class is global, so it can be accessed by subscriber code. The other options are either invalid or incorrect. Salesforce

Reference:B2B Commerce and D2C Commerce Developer Guide,API Classes

What is default behavior for how theSalesforce B2B Commerce Global APIs transform Salesforce data?

A.
Fields names are returned using the Salesforce naming convention.
A.
Fields names are returned using the Salesforce naming convention.
Answers
B.
Fields names are returned with c.' prepended in their name.
B.
Fields names are returned with c.' prepended in their name.
Answers
C.
Fields names are returned with a lowercase first letter,camelcase convention
C.
Fields names are returned with a lowercase first letter,camelcase convention
Answers
D.
Fields names can be mapped to any naming convention desired
D.
Fields names can be mapped to any naming convention desired
Answers
Suggested answer: C

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

Reference:B2B Commerce and D2C Commerce Developer Guide,Query Transformation

What is essential for a Salesforce B2B Commerce theme to show up in the theme section in CC Admin?

A.
The theme needs to be set as a Custom Setting in Salesforce.
A.
The theme needs to be set as a Custom Setting in Salesforce.
Answers
B.
The theme needs to be set in the Configuration Settings.
B.
The theme needs to be set in the Configuration Settings.
Answers
C.
The theme needs to have 'theme' in the name of the Static Resource.
C.
The theme needs to have 'theme' in the name of the Static Resource.
Answers
D.
The theme needs to be referred to in the head element on the page
D.
The theme needs to be referred to in the head element on the page
Answers
Suggested answer: C

Explanation:

An essential requirement for a Salesforce B2B Commerce theme to show up in the theme section in CC Admin is that the theme needs to have ''theme'' in the name of the Static Resource. For example, a theme named ''MyTheme'' will not appear in CC Admin, but a theme named ''MyTheme_theme'' will. This is how the framework identifies which static resources are themes and which are not. Salesforce

Reference:B2B Commerce and D2C Commerce Developer Guide,Themes

Total 221 questions
Go to page: of 23