ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 64 - Certified B2C Commerce Developer discussion

Report
Export

A NewsletterSubscription custom object exists that has a key attribute named email of type String and the following script code.

var CustomObject = dw.object.CustomObjectMgr.createCustomObject('NewsletterSubscription' newsletterForm.email.value);

However, the NewsletterSubscription custom object is not persisted. What is a possible reason?

A.
The code shown is the wrong syntax. The correct syntax is:var CustomObject = dw.object.CustomObjectMgr.createCustomObject('NewsletterSubscription' 'email' newsletterForm.email.value);
Answers
A.
The code shown is the wrong syntax. The correct syntax is:var CustomObject = dw.object.CustomObjectMgr.createCustomObject('NewsletterSubscription' 'email' newsletterForm.email.value);
B.
The code shown needs to be wrapped in a try/catch block
Answers
B.
The code shown needs to be wrapped in a try/catch block
C.
The code shown is the wrong syntax. The correct syntax is:var CustomObject = dw.object.CustomObjectMgr.createCustomObject(newsletterForm.email.value 'NewsletterSubscription');
Answers
C.
The code shown is the wrong syntax. The correct syntax is:var CustomObject = dw.object.CustomObjectMgr.createCustomObject(newsletterForm.email.value 'NewsletterSubscription');
D.
The code shown needs to be wrapped in a transaction.
Answers
D.
The code shown needs to be wrapped in a transaction.
Suggested answer: A
asked 23/09/2024
Junan Kuah
36 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first