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
5 months agoDenny
6 months agoMalinda
6 months agoScarlet
6 months agoJennifer
6 months agoGail
6 months agoTwila
6 months agoBlythe
6 months agoSherell
7 months agoAntonio
7 months agoMirta
7 months ago