Month End Sale Special - 75% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: newyear

Salesforce Comm-Dev-101 - Salesforce Certified B2C Commerce Developer

Page: 1 / 5
Total 154 questions

Given the following ISML example, how should a developer reference the product object in the current iteration of the basket?

< isloop items= " ${pdict.Basket.products} " var= " product " status= " loopstatus " >

...

< /isloop >

A.

product

B.

pdict.product

C.

pdict.Basket.products[loopstatus]

To ensure SFRA best practices and protect against request forgery, the developer introduced CSRF token generation in the customer address form.

< form ... action= " submit " >

< input name= " ${dw.web.CSRFProtection.getTokenName()} "

value= " ${dw.web.CSRFProtection.generateToken()} " >

...

< the rest of the Form Fields >

....

< /form >

To implement CSRF protection when the form is submitted, the developer needs to introduce the CSRF validation using one or both of these methods as applicable:

validateRequest

validateAjaxRequest

Where in the code does the developer need to add this CSRF validation check?

A.

In the middleware chain of the controller post route

B.

In the controller function that displays the form

C.

In the model function that persists the form data

What code should the developer write to log an unexpected service response?

A.

Logger.warn( ' Unexpected service response. ' )

B.

Logger.debug( ' Unexpected service response. ' )

C.

Logger.error( ' Unexpected service response. ' )

A developer is asked to write a log containing the ID and name of the product with a variable named myProduct.

Which snippet of code should be used?

A.

Logger.warn( ' The current product is {0} with name {1} ' ,myProduct.getID(),myProduct.getName());

B.

Logger.warn( ' The current product is ${myProduct.getID()} with name ${myProduct.getName()} ' );

C.

Logger.warn( ' The current product is {0} with name {1} ' ).context(myProduct.getID(),myProduct.getName());

Multiple shoppers report slow performance on the Product Details Page.

Which tool can a developer use to view average response times for the Product-Detail controller route?

A.

Pipeline Profiler

B.

Request Logs

C.

URL Request Analyzer

Which operation should be done in a controller?

A.

Generate the response as JSON.

B.

Use the Script API to generate data for the view.

C.

Create a plain JavaScript object representing a system object.

A developer cannot create a custom object in Business Manager because the attributes do not show. The developer can view the object but not the attributes.

Which action should the developer take to resolve the problem?

A.

Change the data type of the attributes.

B.

Create an Attribute Group with the desired attributes in it.

C.

Set the attributes to site-specific replicable.

A merchant wants customers to be able to order gift vouchers via their site. Since they can issue an unlimited number of these digital vouchers, this item should be available to sell at all times.

How can a developer use Business Manager to ensure that the gift vouchers are always available?

A.

Check the perpetual flag in the product inventory record.

B.

Manually set the inventory to a high number.

C.

Set StockLevel = maxAllocation for the product.

A developer is given the requirement to add a step to the existing business logic of the registration process.

How should the developer modify the route that handles the customer registration?

A.

Change the controller route with new functionality.

B.

Copy the code from the original route to a new controller route, and change it.

C.

Extend the route with new functionality.

A developer is working on a new site for the U.S. based on an existing Canadian site. One of the requirements is a change to the address form. The current Canadian form has an < options > list with the correct two-letter abbreviation for the provinces.

The U.S. requirements are to:

Have an < options > list with the correct two-letter abbreviation for the states in place of the province field.

Set the U.S. site locale.

Add the options list field definition to the XML file.

How should the developer set up the files before making the required edits?

A.

Create a new sub-folder in the forms folder. Name it en_US. Copy existing address.xml file in the new folder.

B.

Create a copy of existing address.xml file in the default folder. Rename that file to address_en_US.xml.

C.

Create a new sub-folder in the forms folder. Name it US. Copy existing address.xml file in the new folder.