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