我试图在内联编辑器子列表类型的子列表中添加标记全部/取消标记全部按钮。下面我添加了一个列表类型子列表的代码,它不会在内联编辑器子列表中工作。任何人都可以帮助找到这个?如何在内联编辑器子类列表中添加标记全部/取消标记全部按钮netsuite
function button1Func(type) {
if (type=='edit' || 'view')
{
var record = nlapiLoadRecord(nlapiGetRecordType(), nlapiGetRecordId());
var intCount = record.getLineItemCount('item');
var headrow = document.getElementById("item_headerrow");
var head = headrow.insertCell(0);
head.innerHTML ="Select";
for (var rep = 1; rep <= intCount; rep++)
{
var row = document.getElementById("item_row_"+rep);
var x = row.insertCell(0);
var newCheckbox = document.createElement("INPUT");
newCheckbox.setAttribute("type", "checkbox");
newCheckbox.setAttribute("id", "select_CheckBox"+rep);
x.appendChild(newCheckbox);
}
}
}
function button2Func(type) {
if (type=='edit' || 'view')
{
var record = nlapiLoadRecord(nlapiGetRecordType(), nlapiGetRecordId());
var intCount = record.getLineItemCount('item');
for (var rep = 1; rep <= intCount; rep++)
{
var repId = record.getLineItemValue('item', 'item', rep);
if(document.getElementById("select_CheckBox"+rep).checked==true){
makecopyfun(repId);
}
else
{
continue;
}
}
alert("Success");
}
}
function makecopyfun(repId){
var record = nlapiLoadRecord(nlapiGetRecordType(), nlapiGetRecordId());
var intCount = record.getLineItemCount('item');
record.insertLineItem('item',intCount + 1);
alert (intCount);
record.setCurrentLineItemValue('item','item',repId);
record.commitLineItem('item');
var id = nlapiSubmitRecord(record, true);
}
我无法创建新的子列表。我必须在报价单模块的ITEM清单上实现此功能。你在谈论的是一个新的子列表。在这种情况下,我们可以使用addMarkAllButtons(); API来创建此选项。如果您知道如何在内联编辑器子列表中添加markAll按钮,请帮助我。 @ user6291223 – ndh
好吧,我们必须做更多的工作...请按照下面的答案为它..详细写它。 – UDAY