首页 > 解决方案 > 如何在 POST 方法中从 Suitelet 2.0 中的自定义 HTML 表中读取值

问题描述

我在套件中有一个自定义 HTML 页面。在那个 HTML 页面中,我有一个带有不同标签的表格。我需要读取 HTML 表格数据并在 suitelet 2.0 POST 方法中循环表格。

<table class="table" id="custpage_business_class_tb"> 
                  <thead class="thead-light">
                    <tr>
                      <th >Classification</th>
                      <th >Applicable</th>
                      <th >Certificate Number</th>
                      <th >Certifying Agency</th>
                      <th >Expiration Date</th>
                    </tr>
                  </thead>
                  <tbody>
                    <#list ds.bussclasslist as busclass>
                      <tr>
                        <td>
                          <select name="custpage_busclas_list" class="form-control">
                            <option value="">${busclass.values.name}</option>
                          </select>
                        </td>
                        <td><input type="checkbox" name="custpage_busclas_applicable" class="d-block mx-auto mt-3"></td>
                        <td><input type="text" name="custpage_busclas_cert_num" class="form-control"></td>
                        <td><input type="text" name="custpage_busclas_cert_agency" class="form-control"></td>
                        <td><input type="date" name="custpage_busclas_cert_expdt" class="form-control"></td>
                      </tr>
                    </#list>                    
                  </tbody>
                </table>

SuiteLet 2.0 发布方法。

var lineCount = context.request.getLineCount({ group: 'custpage_business_class_tb' });
                log.debug('Total lines in Bank Details are:- ' + lineCount);

任何帮助将不胜感激。

标签: netsuitesuitescript2.0

解决方案


推荐阅读