Can I create a custom form in Suitelet using Bootstrap for Netsuite?

試著忘記壹切 提交于 2019-12-06 06:53:47

If you are using your own HTML/CSS, you should be able to get the values using request.getBody(). You should then parse the response body to fetch the values from form.

Alternatively, you can write a client-side javascript, which sets the URL parameters and its values on submit event, then you would be able to get the values using request.getParameter() APIs.

Check this out, I created this Suitelet in Suitescript 2.0. Its a hack but works fine. Just add your POST conditionals to grab the data from the form. https://ursuscode.com/netsuite-tips/loading-custom-html-and-bootstrap-within-a-suitelet-form/

You can use regular form post with action method pointing to your suitescript end point and on the other side you can get the values with request.getAllParameters().

e.g

HTML:

 <form role="form" action = "https://forms.netsuite.com/app/site/hosting/scriptlet.nl?script=XXX&deploy=1&compid=XXXXXX&h=XXXXXXXXXXXXX" method ="POST">

Suitescript:

 var params = request.getAllParameters();
 var email= params['email'];
 var name = params['name'];     
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!