ExamGecko
Home Home / Salesforce / Certified B2B Commerce Developer

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

Question list
Search
Search

List of questions

Search

Although Salesforce B2B Commerce and Salesforce recommend against using

'without sharing classes' whenever possible, sometimes it is unavoidable. Which three items will open up a major security hole? (3 answers)

A.
Executing dynamic SOQL inside a without sharing class with a bind variable fromPageReference.getParameters().
A.
Executing dynamic SOQL inside a without sharing class with a bind variable fromPageReference.getParameters().
Answers
B.
Executing dynamic SOQL inside a without sharing class with a bind variable from theUserInfo class.
B.
Executing dynamic SOQL inside a without sharing class with a bind variable from theUserInfo class.
Answers
C.
Executing dynamic SOQL inside a without sharing class with a bind variable fromPageReference.getCookies().
C.
Executing dynamic SOQL inside a without sharing class with a bind variable fromPageReference.getCookies().
Answers
D.
Executing dynamic SOQL inside a without sharing class with a bind variable fromcc_RemoteActionContentex class.
D.
Executing dynamic SOQL inside a without sharing class with a bind variable fromcc_RemoteActionContentex class.
Answers
E.
Executing dynamic SOQL inside a without sharing class with a bind variable fromccAPI.CURRENT_VERSION.
E.
Executing dynamic SOQL inside a without sharing class with a bind variable fromccAPI.CURRENT_VERSION.
Answers
Suggested answer: A, C, D

Explanation:

Executing dynamic SOQL inside a without sharing class with a bind variable from PageReference.getParameters(), PageReference.getCookies(), or cc_RemoteActionContext class will open up a major security hole because these sources of input are not sanitized and can be manipulated by malicious users to inject SOQL queries that bypass the sharing rules and access data that they are not supposed to see. For example, a user can modify the URL parameters or cookies to include a SOQL query that returns sensitive data from the database. To prevent this, it is recommended to use static SOQL or escape the bind variables before executing dynamic SOQL.

The ccrz.cc_hk_UserInterface apex class, HTMLHead Include Begin and HTML Head Include End Cloudcraze Page Include sections allow additional content to be added to the HTML <head> tag. What are two reasons that is it preferred to use the ccrz.cc_hk_UserInterface extension over the Cloudcraze Page Include sections? (2 answers)

A.
Salesforce apex:include is wrapped in <span> tags.
A.
Salesforce apex:include is wrapped in <span> tags.
Answers
B.
HTML does not support tags inside the <head> C Salesforce apex:include is wrapped in tags.
B.
HTML does not support tags inside the <head> C Salesforce apex:include is wrapped in tags.
Answers
C.
HTML does not support <span> tags inside the <head>
C.
HTML does not support <span> tags inside the <head>
Answers
Suggested answer: A

Explanation:

The ccrz.cc_hk_UserInterface apex class is preferred over the HTMLHead Include Begin and HTML Head Include End Cloudcraze Page Include sections because Salesforce apex:include is wrapped in <span> tags, which are not valid inside the HTML <head> tag. This can cause rendering issues or unexpected behavior in some browsers. The ccrz.cc_hk_UserInterface extension allows adding content to the HTML <head> tag without using apex:include.

The ccUtil apex class in Salesforce B2B Commerce provides numerous utility functions that can be leveraged in subscriber classes.

What are two ways to check the input or return data of the Global API's? (2 answers)

A.
ccrz.ccUtil.isNotEmpty(Map<String, Object>) andccrz.ccUtil.isNotEmpty(List<Object>)
A.
ccrz.ccUtil.isNotEmpty(Map<String, Object>) andccrz.ccUtil.isNotEmpty(List<Object>)
Answers
B.
ccrz.ccUtil.isNotValid(Map<String, Object>) andccrz.ccUtil.isNotValid(List<Object>)
B.
ccrz.ccUtil.isNotValid(Map<String, Object>) andccrz.ccUtil.isNotValid(List<Object>)
Answers
C.
ccrz.ccUtil.isValid(Map<String, Object>) and ccrz.ccUtil.isValid(List<Object>)
C.
ccrz.ccUtil.isValid(Map<String, Object>) and ccrz.ccUtil.isValid(List<Object>)
Answers
D.
ccrz.ccUtil.isEmpty(Map<String, Object>) and ccrz.ccUtil.isEmpty(List<Object>)
D.
ccrz.ccUtil.isEmpty(Map<String, Object>) and ccrz.ccUtil.isEmpty(List<Object>)
Answers
Suggested answer: A, D

Explanation:

The ccUtil apex class provides two methods to check the input or return data of the Global API's: ccrz.ccUtil.isNotEmpty(Map<String, Object>) and ccrz.ccUtil.isEmpty(Map<String, Object>). These methods return true if the map is not null and contains at least one entry, or if the map is null or empty, respectively. Similarly, ccrz.ccUtil.isNotEmpty(List<Object>) and ccrz.ccUtil.isEmpty(List<Object>) return true if the list is not null and contains at least one element, or if the list is null or empty, respectively. These methods are useful for validating the input parameters or the output results of the Global API's.

The ccUtil apex class in Salesforce B2B Commerce provides numerous utility functions that can be leveraged in subscriber classes. Which command will return the value in the given Map if found or a default value in the event that the Map is null,

empty, or an object is not found for that key?

A.
ccrz.ccUtil.defv (Map<String.Object> mp, String key , Object ob)
A.
ccrz.ccUtil.defv (Map<String.Object> mp, String key , Object ob)
Answers
B.
ccrz.ccUtil.defVal (Map<String.Object> mp, String key, Object ob)
B.
ccrz.ccUtil.defVal (Map<String.Object> mp, String key, Object ob)
Answers
C.
ccrz.ccUtil.... (Map<String.Object> mp, String key, Object ob)
C.
ccrz.ccUtil.... (Map<String.Object> mp, String key, Object ob)
Answers
D.
ccrz.ccUtil.defaultValue(Map<String.Object> mp, String key , Object ob)
D.
ccrz.ccUtil.defaultValue(Map<String.Object> mp, String key , Object ob)
Answers
Suggested answer: B

Explanation:

The ccrz.ccUtil.defVal (Map<String.Object> mp, String key, Object ob) method will return the value in the given Map if found or a default value in the event that the Map is null, empty, or an object is not found for that key. This method is useful for providing fallback values for configuration settings or input parameters that may be missing or invalid. Salesforce

Reference:B2B Commerce and D2C Commerce Developer Guide,ccUtil Class

A configuration value, CO.NewOrder, is set to TRUE. What is one way of preventing anexisting payment page from being shown on the checkout payment page?

A.
Delete the Visualforce page from the code base.
A.
Delete the Visualforce page from the code base.
Answers
B.
Remove the value matching the page name from the pmt.whitelist configurationsetting, then rebuild and activate a new Configuration cache
B.
Remove the value matching the page name from the pmt.whitelist configurationsetting, then rebuild and activate a new Configuration cache
Answers
C.
Remove the payment type associated with the payment page from CO.pmts, thenrebuild and activate a new cache.
C.
Remove the payment type associated with the payment page from CO.pmts, thenrebuild and activate a new cache.
Answers
D.
Override the front end template and modify the way the embedded payment page getsloaded from the payment list configuration.
D.
Override the front end template and modify the way the embedded payment page getsloaded from the payment list configuration.
Answers
Suggested answer: B

Explanation:

This approach effectively removes the payment page from the list of allowed pages, ensuring itis not displayed during the checkout process.

Thepmt.whitelistconfiguration setting in Salesforce B2B Commerce is used to manage theVisualforce pages that support all payment types on the storefront1. If you want to prevent anexisting payment page from being shown on the checkout payment page, one way to do it is toremove the value matching the page name from thepmt.whitelistconfiguration setting.Afterdoing this, you would need to rebuild and activate a new Configuration cache for the changesto take effect1.Please note that this information is based on the Salesforce B2B Commercedocumentation and best practices1.

A Developer created a custom field that a project wants to expose on a given page.

How does the Developer ensure that the field is available to display on a given page?

A.
Override the Service Class that the page uses and update the ServiceManagementin CCAdmin for the given storefront to use this new Service Class.
A.
Override the Service Class that the page uses and update the ServiceManagementin CCAdmin for the given storefront to use this new Service Class.
Answers
B.
Override the Logic Class that the page uses and update the Service Management inCCAdmin for the given storefront to use this new Service Class
B.
Override the Logic Class that the page uses and update the Service Management inCCAdmin for the given storefront to use this new Service Class
Answers
C.
Create a new Service Classthat the page uses and update the Service Managementin CCAdmin for the given storefront to use this new Service Class
C.
Create a new Service Classthat the page uses and update the Service Managementin CCAdmin for the given storefront to use this new Service Class
Answers
D.
Create a new Logic Class that the page uses and update the Service Managementin CCAdmin for the given storefront to use this new Service Class
D.
Create a new Logic Class that the page uses and update the Service Managementin CCAdmin for the given storefront to use this new Service Class
Answers
Suggested answer: A

Explanation:

To ensure that a custom field is available to display on a given page, the Developer needs to override the Service Class that the page uses and update the Service Management in CCAdmin for the given storefront to use this new Service Class. The Service Class is responsible for retrieving and setting data for a given page. The Logic Class is responsible for implementing business logic and validation rules for a given page. Creating a new Service Class or Logic Class is not necessary, as overriding an existing one can achieve the same result. Salesforce

Reference:B2B Commerce and D2C Commerce Developer Guide,Service Classes,Logic Classes

A developer is trying to troubleshoot why a field is not displaying on the Product Detail Page. What should be typed in the Developer Tools Console in the browser to view the fields available for the Product Detail Page?

A.
CCRZ.productSearchView
A.
CCRZ.productSearchView
Answers
B.
CCRZ.cartView
B.
CCRZ.cartView
Answers
C.
CCRZ.productDetailModel
C.
CCRZ.productDetailModel
Answers
D.
CCRZ.productDetailView
D.
CCRZ.productDetailView
Answers
Suggested answer: C

Explanation:

To view the fields available for the Product Detail Page, the developer should type CCRZ.productDetailModel in the Developer Tools Console in the browser. This will display the product detail model object, which contains the product data and attributes that are rendered on the page. The other options are either not valid or not relevant for the Product Detail Page.

For which two reasons is it preferable to extend the Salesforce B2B Commerce remote invocation object instead of using the standard Salesforce remote action invocation manager (2 answers)

A.
A standard remote action will not have access to Salesforce B2B Commerce objects.
A.
A standard remote action will not have access to Salesforce B2B Commerce objects.
Answers
B.
The APEX method called by the remote action will be passed as a Salesforce B2B Commerce context object.
B.
The APEX method called by the remote action will be passed as a Salesforce B2B Commerce context object.
Answers
C.
Salesforce B2B Commerce includes do not support standard SalesForce remote actions.
C.
Salesforce B2B Commerce includes do not support standard SalesForce remote actions.
Answers
D.
The Salesforce B2B Commerce logger cannot be utilized in standard remote actions
D.
The Salesforce B2B Commerce logger cannot be utilized in standard remote actions
Answers
Suggested answer: B, D

Explanation:

It is preferable to extend the Salesforce B2B Commerce remote invocation object instead of using the standard Salesforce remote action invocation manager for two reasons:

The APEX method called by the remote action will be passed as a Salesforce B2B Commerce context object, which contains useful information such as the current user, cart, storefront, and configuration settings. This can simplify the development and testing of the remote action.

The Salesforce B2B Commerce logger can be utilized in the remote action, which allows logging messages and errors to the debug log or to a custom object. This can facilitate debugging and troubleshooting of the remote action.

How are variables bound when services use the ccSercviceDao classto execute queries?

A.
Global variables
A.
Global variables
Answers
B.
Apex local variables
B.
Apex local variables
Answers
C.
String substitution
C.
String substitution
Answers
D.
Apex class variables
D.
Apex class variables
Answers
Suggested answer: C

Explanation:

When services use the ccServiceDao class to execute queries, variables are bound by string substitution. This means that the query string contains placeholders for variables that are replaced by their values at runtime. For example,ccrz.ccServiceDao.getQuery('SELECT Id FROM Account WHERE Name = :name')will replace:namewith the value of thenamevariable.

How are version related upgrades passed on to subscriber API extensions/overrides?

A.
APIs callback with specific versions specified; the user must know which version number to use.
A.
APIs callback with specific versions specified; the user must know which version number to use.
Answers
B.
Copy and paste of specific code is 'built-in'
B.
Copy and paste of specific code is 'built-in'
Answers
C.
Extensions and overridden APIs don't support-related upgrades.
C.
Extensions and overridden APIs don't support-related upgrades.
Answers
D.
The 'delegate' allows inherited method calls access to the most recentlyspecified service version
D.
The 'delegate' allows inherited method calls access to the most recentlyspecified service version
Answers
Suggested answer: D
Total 221 questions
Go to page: of 23