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 3 out of 5 pages
Viewing questions 21-30 out of questions
Questions # 21:

Below is a form definition snippet from the newsletter.xml file:

< ?xmlversion= " 1.0 " ? >

< formxmlns= " http://www.demandware.com/xml/form/2008-04-19 " >

< fieldformid= " email " label= " Email: " type= " string "

mandatory= " true " max-length= " 50 " / >

< /form >

Which line of code creates a JSON object to contain the form data?

Options:

A.

server.forms.getForm( ' newsletter ' )

B.

server.form.getForm( ' newsletter ' )

C.

server.forms.getForm( ' dwfrm_newsletter ' )

Questions # 22:

A developer is using logging in scripts to troubleshoot an issue. They are using the dw.system.Log class to write to specific log levels and categories. Which log level is always enabled by default?

Options:

A.

FATAL

B.

INFO

C.

ERROR

Questions # 23:

A merchant has a content slot on a page that currently displays products based on the top sellers for the current week. The merchant wants to change this functionality. They want to have the slot render a specific content asset so that the content experience is more personalized to the visitors.

Which two actions are necessary to make this change?

Options:

A.

Change the content type AND the rendering template in the slot configuration.

B.

Change the default setting AND the rendering template in the slot configuration.

C.

Change the rendering template in the slot configuration AND delete the existing content slot to create a new one.

Questions # 24:

There are three logging categories: category1, category1.eu, and category1.us. In Business Manager, category1 is enabled for WARN level and no other categories are configured. All custom log targets are enabled.

The code segment below executes.

varlogger=Logger.getLogger( " loggerFile " , " category1.eu " );

logger.warn( " This is a log message " );

What is the result?

Options:

A.

Logs will be written to the log file with a prefix loggerFile.

B.

Logs will be written to the log file with a prefix custom-loggerFile.

C.

Logs will be written to the log file with a prefix customwarn.

Questions # 25:

Which is an appropriate use of the < isif > ISML tag that follows B2C Commerce and SFRA best practices?

Options:

A.

Show a different < div > tag depending on a pdict Boolean variable.

B.

Implement involved business logic through conditional statements.

C.

Redirect users to the registration page if they are not logged in.

Questions # 26:

There is a business requirement to allow a third-party warehouse management system to update the MySample.com storefront product inventory in real time. The architect decided that this is most easily accomplished by using the Open Commerce API (OCAPI). The developer needs to test the OCAPI settings in their sandbox. Assume the client ID for testing is " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " . What is the correct OCAPI setting for this?

Options:

A.

Type:Data,Context:Global{ " _v " : " 20.4 " , " clients " :[{ " client_id " : " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " , " allowed_origins " :[ " http://www.example.com " ], " resources " :[{ " resource_id " : " /inventory_lists/* " , " methods " :[ " get " , " put " , " patch " ], " read_attributes " : " (**) " , " write_attributes " : " (**) " }]}] }

B.

Type:Shop,Context:MySample{ " _v " : " 20.4 " , " clients " :[{ " client_id " : " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " , " allowed_origins " :[ " http://www.example.com " ], " resources " :[{ " resource_id " : " /product/*/inventory " , " methods " :[ " get " , " put " , " patch " ], " read_attributes " : " (**) " , " write_attributes " : " (**) " }]}] }

C.

Type:Data,Context:Global{ " _v " : " 20.4 " , " clients " :[{ " client_id " : " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " , " allowed_origins " :[ " http://www.mysample.com " ], " resources " :[{ " resource_id " : " /product/*/inventory " , " methods " :[ " get " , " put " , " patch " ], " read_attributes " : " (**) " , " write_attributes " : " (**) " }]}] }

Questions # 27:

A developer plans to use the/search_suggestion(Shop API) in a Storefront application and the following property must be set to do so:

suggestion.product.image:view_type

What consideration should the developer keep in mind to ensure that image data is returned correctly as part of search suggestions?

Options:

A.

If theview_typeis not set or if theview_typeis unknown, the image properties are not part of the response.

B.

If theview_typeis not set or if theview_typeis unknown, the image size ofsmallis used by default.

C.

If theview_typeis not set or if theview_typeis unknown, the image size oflargeis used by default.

Questions # 28:

Reference the following code snippets that allow a form to function correctly.

Form definition (newsletter.xml):

< ?xmlversion= " 1.0 " ? >

< formxmlns= " http://www.demandware.com/xml/form/2008-04-19 " >

< fieldformid= " email " label= " Email: " type= " string "

mandatory= " true " max-length= " 50 " / >

< /form >

Controller snippet:

varnewsletterForm=server.forms.getForm( ' newsletter ' );

res.render( ' NewsletterTemplate ' ,{newsletterForm:newsletterForm});

Template snippet:

< form action= " ${URLUtils.url( ' Newsletter-Submit ' )} " method= " POST "

< isprint value= " ${EXPRESSION.attributes} " encoding= " off " / > >

< input type= " input " id= " email "

< isprint value= " ${EXPRESSION.email.attributes} " encoding= " off " / > >

< button type= " submit " > Submit < /button >

< /form >

Which code should a developer insert at the EXPRESSION placeholder in the ISML template snippet above to have the form work as expected?

Options:

A.

pdict.newsletterForm

B.

pdict.newsletter

C.

newsletterForm

Questions # 29:

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?

Options:

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.

Questions # 30:

A merchant has asked their development team to add a new site.

Which task is essential for correct site configuration prior to launch?

Options:

A.

Assign a default currency.

B.

Assign a default payment method.

C.

Assign a default payment processor.

Viewing page 3 out of 5 pages
Viewing questions 21-30 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.