What tool can a developer use to investigate errors during development?
Correct Answer: D
Browser dev tools are a set of web authoring and debugging tools built into most modern browsers. They allow developers to inspect, edit, and debug the HTML, CSS, JavaScript, and network activity of a web page. They can also provide useful information about errors, warnings, performance, and accessibility issues. Browser dev tools are especially helpful for developing and testing Lightning web components, as they can display the component hierarchy, attributes, events, and slots. The other options are not correct because: * A. Commerce Diagnostics Event Logging is a feature that enables developers to capture and analyze events that occur during the execution of B2C Commerce code. It can help identify performance bottlenecks, memory leaks, and unexpected behavior. However, it is not a tool that can be used directly by the developer, but rather a service that requires a support request to enable and access. * B. Checkout Flow Log is a log file that shows the details of the checkout flow execution, such as the input and output parameters, the pipeline steps, and the errors and warnings. It can help troubleshoot issues related to the checkout process, such as payment, shipping, or tax calculation. However, it is not a tool that can be used during development, but rather a log file that can be accessed after the checkout flow has run. * C. Support cases are requests for assistance from the Salesforce support team. They can help resolve technical issues, provide guidance, or escalate bugs. However, they are not a tool that can be used to investigate errors during development, but rather a communication channel that can be used after the developer has exhausted other resources. References: * Browser Dev Tools * Debug Your Lightning Web Components * Commerce Diagnostics Event Logging * [Checkout Flow Log]
Question 117
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?
Correct 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 theorder. 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 References: B2B Commerce Developer Guide: Order Summary Object, B2B Commerce Developer Guide: Order Status Enum, Data Loader Guide: Export Data from Salesforce
Question 118
How are variables bound when services use the ccSercviceDao classto execute queries?
Correct Answer: C
When services use the ccServiceDao class to execute queries, variables are bound by string substitution. This means that the query string containsplaceholders for variables that are replaced by their values at runtime. For example, ccrz.ccServiceDao.getQuery( ' SELECT Id FROM Account WHERE Name = :name ' ) will replace : name with the value of the name variable.
Question 119
Which event should be triggered when user facing info, warning or error messages need to be displayed on a Visualforce page?
Correct Answer: D
The event that should be triggered when user facing info, warning or error messages need to be displayed on a Visualforce page is pageMessage. This event is triggered by the displayPageMessage method of the CCRZ. util class, which is a utility class thatprovides various helper methods for common tasks. The event can be used to display a message on the page with a specified type, title, and text. For example, CCRZ.util. displayPageMessage( ' error ' , ' Oops! ' , ' Something went wrong. ' ) will trigger the pageMessage event and display an error message on the page. Salesforce References: B2B Commerce and D2C Commerce Developer Guide, Events, Util Class
Question 120
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)
Correct Answer: A,C,D
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.