Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Event form suitelet
Hello. I tried to make an event entry from Customer Center using this code:
function EventForm(request, response) { if(request.getMethod() == 'GET') { //atunci se creeaza si se populeaza forma var form = nlapiCreateForm('Enter Event Form'); var title = form.addField('title','text','Title'); //id:title var location = form.addField('location','text','Location'); //id:location var st_date = form.addField('_date','date','Date'); //id:startdate var from = form.addField('from','timeofday','From'); //id:starttime var to = form.addField('to','timeofday','To'); //id: endtime var message = form.addField('message','longtext','Message'); //id: message form.addSubmitButton('Submit'); response.writePage(form); } else{ dumpResponse(request,response); } } function createEventRecord(title, location, st_date, from, to, message) { var record = nlapiCreateRecord('calendarevent'); //reference guide pg. 23 record.setFieldValue('title', title); record.setFieldValue('location', location); record.setFieldValue('startdate', st_date); record.setFieldValue('starttime', from); record.setFieldValue('endtime', to); record.setFieldValue('message', message); var id = nlapiSubmitRecord(record, true); } 0