A Newsletter controller contains the following route:
Server.post('Subscribe', function (req,res,next){
var newsletterForm = server.forms.getForm('newsletter');var CustomObjectMgr = require('dw/object/CustomObjectMgr');
if(newsletterForm.valid){
try{
var CustomObject =
CustomObjectMgr.createCustomObejct('NewsletterSubscription', newsletterform.email.value);
CustomObject.custom.firstName = newsletterForm.fname.value;
CustomObject.custom.lastName = newsletterForm.lname.value;-
} catch(e){
//Catch error here
}
}
next();
});
Assuming the Custom Object metadata exists, why does this route fail to render the newsletter template
when the subscription form is correctly submitted?
Buddy
9 months agoDenny
9 months agoMalinda
9 months agoScarlet
9 months agoJennifer
9 months agoGail
9 months agoTwila
9 months agoBlythe
9 months agoSherell
10 months agoAntonio
10 months agoMirta
10 months ago