Month End Sale Special Limited Time 75% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code = drift75

Pass the Salesforce Developers Comm-Dev-101 Questions and answers with ExamsMirror

Practice at least 50% of the questions to maximize your chances of passing.
Exam Comm-Dev-101 Premium Access

View all detail and faqs for the Comm-Dev-101 exam


0 Students Passed

0% Average Score

0% Same Questions
Viewing page 2 out of 5 pages
Viewing questions 11-20 out of questions
Questions # 11:

The developer is asked to enhance the functionality of an existing controller route by adding information to the response ' s viewData.

How should the developer approach this task while following SFRA best practices?

Options:

A.

Use the " append " method of the server module for the existing route.

B.

Replace the callback function of the existing route using superModule.

C.

Use the " extend " method of the server module for the existing route.

Questions # 12:

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?

Options:

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

Questions # 13:

Given a B2C Commerce client with these specifics:

Sells in two different countries: US and IN

Uses only the English language

A developer has a requirement to add a new field to the IN registration form that must not appear in the US one.

Which path should be created to accomplish this requirement?

Options:

A.

cartridge/forms/en_IN/profile.xml

B.

cartridge/forms/profile_en_IN.xml

C.

cartridge/forms/profile_in.xml

Questions # 14:

A developer has the following files in template/resources:

• account.properties - > weight.unit=kilos

• account_en.properties - > weight.unit=stones

• account_en_US.properties - > weight.unit=pounds

Using the default locale configuration, what is the current outcome of the page that renders the account.isml template snippet below when visiting the Storefront with the English for Canada (en_CA) locale?

Your parcel weighs 10 ${Resource.msg( ' weight.unit ' , ' account ' ,null)}.

Options:

A.

Your parcel weighs 10 pounds.

B.

Your parcel weighs 10 stones.

C.

Your parcel weighs 10 account.

Questions # 15:

A developer needs to show only car accessories when shoppers use the search term " car accessories " and exclude technology accessories and household accessories.

Given the above requirement, what is the recommended approach using the Search Dictionaries Dashboard?

Options:

A.

Create a Synonym Dictionary entry: car accessories, household, technology. Use search mode First Word.

B.

Create a Common Phrase Dictionary entry: car accessories. Use search mode Exact Match.

C.

Create a Common Phrase Dictionary entry: car accessories, NOT household, NOT technology. Use search mode Exact Match.

Questions # 16:

What is the correct format to use for embedding a link to a content page?

Options:

A.

< a href= " ${URLUtils.url( ' Content-Show ' , ' about-us ' )} " > About Us < /a >

B.

< a href= " ${URLUtils.url( ' Page-Show ' , ' cid ' , ' about-us ' )} " > About Us < /a >

C.

< a href= " ${URLUtils.url( ' Content-Page ' , ' cid ' , ' about-us ' )} " > About Us < /a >

Questions # 17:

A developer is asked to create a controller endpoint that will be used in a client-side AJAX request. Its purpose is to display updated information to the user when the request is completed, without otherwise modifying the appearance of the current page.

According to SFRA practices, which method best supports this objective?

Options:

A.

res.json()

B.

res.render()

C.

res.print()

Questions # 18:

A controller route in the SFRA base looks as follows:

server.get( ' Show ' ,consentTracking.consent,cache.applyDefaultCache,

function(req,res,next) {

...base code omitted on purpose...

next();

},

pageMetaData.computedPageMetaData

);

In order to extend this route usingprepend(), what should the developer consider?

Options:

A.

Specify any middleware functions needed for the new functionality.

B.

Specify any middleware functions needed for the new functionality using only those called by the base route.

C.

Removenext();on the new route so only the route ' s middleware functions execute.

Questions # 19:

A developer is inspecting the weekly service status report for a critical internally-hosted web service and notices there are too many instances of unavailability.

Which solution can reduce service unavailability?

Options:

A.

Increase the web service time out.

B.

Change the code that sets the throwOnError attribute of the service to be true.

C.

Modify the code that makes the request to the external service to be wrapped in a try/catch block.

Questions # 20:

How should a developer set up the files before making required edits to the address form?

Options:

A.

Create a copy of existingaddress.xmlfile in the default folder. Rename that file toaddress_en_US.xml.

B.

Create a new sub-folder in the forms folder. Name iten_US. Copy existingaddress.xmlfile in the new folder.

C.

Create a new sub-folder in the xmls folder. Name iten_US. Copy existingaddress.xmlfile in the new folder.

Viewing page 2 out of 5 pages
Viewing questions 11-20 out of questions
TOP CODES

TOP CODES

Top selling exam codes in the certification world, popular, in demand and updated to help you pass on the first try.