LearningSalesForceCommerceC.../the_learning_cartridge/cartridge/scripts/storageService.js

18 lines
553 B
JavaScript

'use strict';
var CustomObjectMgr = require('dw/object/CustomObjectMgr');
function storeCyborgForm(cyborgForm) {
var CustomObject = CustomObjectMgr.createCustomObject('Cyborgtracker', cyborgForm.email.value);
CustomObject.custom.cyborgname = cyborgForm.cyborgname.value;
CustomObject.custom.humanname = cyborgForm.humanname.value;
CustomObject.custom.email = cyborgForm.email.value;
CustomObject.custom.mostlyhuman = cyborgForm.mostlyhuman.value;
return CustomObject;
}
module.exports = {storeCyborgForm: storeCyborgForm};