关于netsuite创建组合按钮的方法,合并按钮,netsuite API

组合按钮就是netsuite中比较常用的控件,就是系统自动的将相类型功能的按钮拼接在一起,在系统的设置首选项(/app/center/userprefs.nl?sc=-29)中可以控制是否使用组合按钮。

合并表格中的类似按钮

Check this box to roll up similar buttons on forms.

For example, checking this box rolls up all save options under the Save button. Click the arrow on the Save button to see a list of options and choose how you want to save the form.

字段ID: COMBINESIMILARBUTTONS

系统内置的api,不包含在发布的guide中。隐含API。

一下是以export按钮为例子来说明的按钮合并:

<script language="javascript">document.write(new NLMultiButton('multibutton_export', [['Export - CSV', "export"],['Export - Microsoft &#174; Excel', "exportXLS"]],'Export - CSV','null','export',false));</script>
[['Export - CSV', "export"],['Export - Microsoft &#174; Excel', "exportXLS"]] 这是两个按钮,
'Export - CSV','null','export' 这个是默认的按钮显示,和它的ID系统既能关联出其方法来,具体方法我会单独写出来。
 
['Export - CSV', "export"] 是一个按钮以及点击后的方法名。
 
<table id='tbl_export' cellpadding=0 cellspacing=0 border=0 style="cursor:hand;"><tr><td nowrap class='rndbuttoncaps' background="/images/buttons/upper_left_cap.gif"><img src='/images/nav/stretch.gif' border=0 width=4></td><TD height=20 valign='bottom' nowrap class='rndbuttonbody' background="/images/buttons/upper_body.gif" style="padding-top:2"> <INPUT type='button' style='vertical-align: middle; ' class='rndbuttoninpt' value='Export - CSV' id='export' name='export' onclick="document.forms['footer_actions'].elements.csv.value='Export';document.forms['footer_actions'].elements.OfficeXML.value='F';document.location.replace(appendFormDataToURL('/app/crm/support/caselist.csv?searchtype=Case')); document.forms['footer_actions'].elements.csv.value='HTML'; ;return false;" onmousedown="this.setAttribute('_mousedown','T'); setButtonDown(true, false, this);" onmouseup="this.setAttribute('_mousedown','F'); setButtonDown(false, false, this);" onmouseout="if(this.getAttribute('_mousedown')=='T') setButtonDown(false, false, this);" onmouseover="if(this.getAttribute('_mousedown')=='T') setButtonDown(true, false, this);"></TD><td nowrap class='rndbuttoncaps' background="/images/buttons/upper_right_cap.gif"><img src='/images/nav/stretch.gif' border=0 width=4></td></tr></table></TD><TD style=" display:none;" ><table id='tbl_exportXLS' cellpadding=0 cellspacing=0 border=0 style="cursor:hand;"><tr><td nowrap class='rndbuttoncaps' background="/images/buttons/upper_left_cap.gif"><img src='/images/nav/stretch.gif' border=0 width=4></td><TD height=20 valign='bottom' nowrap class='rndbuttonbody' background="/images/buttons/upper_body.gif" style="padding-top:2"> <INPUT type='button' style='vertical-align: middle; ' class='rndbuttoninpt' value='Export - Microsoft &#174; Excel' id='exportXLS' name='exportXLS' onclick="document.forms['footer_actions'].elements.csv.value='Export';document.forms['footer_actions'].elements.OfficeXML.value='T';document.location.replace(appendFormDataToURL('/app/crm/support/caselist.xls?searchtype=Case')); document.forms['footer_actions'].elements.csv.value='HTML'; ;return false;" onmousedown="this.setAttribute('_mousedown','T'); setButtonDown(true, false, this);" onmouseup="this.setAttribute('_mousedown','F'); setButtonDown(false, false, this);" onmouseout="if(this.getAttribute('_mousedown')=='T') setButtonDown(false, false, this);" onmouseover="if(this.getAttribute('_mousedown')=='T') setButtonDown(true, false, this);"></TD><td nowrap class='rndbuttoncaps' background="/images/buttons/upper_right_cap.gif"><img src='/images/nav/stretch.gif' border=0 width=4></td></tr></table>

如何http://www.cnblogs.com/backuper/archive/2008/12/08/1350230.html

JS导出txt文本文件,Netsuite方案

document.location.replace(appendFormDataToURL('/app/crm/support/caselist.xls?searchtype=Case'));
上一篇内容中写到的导出txt,完全可以通过这个方法,通过suitelet自动的生成txt然后就可以弹出txt保存的窗口,提供用户下载。
这样两篇文章结合起来即可写出比较完美导出方案。利用系统隐含的API哦~~
netsuite技术客服已经建议过我,尽量少用这类的系统未公布的API,
因为netsuite完全可以不通知你的情况替换掉这个api这样你以前写的程序就应声倒下, 不好,不好~     呵呵,,
 
原文地址:https://www.cnblogs.com/backuper/p/1350305.html