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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
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