我有一个Suitelet脚本,在保存的搜索NetSuite的交易行项目的拉动。用户可以在一行或多行上检查已核对的复选框,然后单击提交按钮,脚本将加载每个已协调的记录复选框= true并更新记录上的特定行项目,然后提交记录。问题在于我为一个套书打出治理限制1000,因为我认为每个迭代= 30单位。有没有办法让我编写代码,以便脚本可以加载记录并更新所有对帐复选框= true的行项目,然后提交记录?在大多数情况下,我只打开4 - 5条记录,但更新每条记录上的许多行。这是我目前使用的代码。NetSuite的Suitelet:遍历交易行项加载的列表,并提交记录没有达到治理限制
for(var i=1; i< count+1; i++)
\t {
\t //get the value of the reconcile checkbox
\t var reconcileTransaction = request.getLineItemValue('custpage_transaction_list', 'reconcile', i);
// If it's checked, reconcile the transaction
\t if(reconcileTransaction == 'T')
\t {
\t // Get the transaction internal ID
\t var internalId = request.getLineItemValue('custpage_transaction_list', 'internalid', i);
\t // Get the transaction type
\t var recordType = request.getLineItemValue('custpage_transaction_list', 'recordtype', i);
\t var recordLine = request.getLineItemValue('custpage_transaction_list', 'linesequencenumber', i);
\t // var totalAmount = totalAmount + request.getLineItemValue('custpage_transaction_list', 'amount', i);
\t try
\t {
\t var recTransaction = nlapiLoadRecord(recordType, internalId);
\t recTransaction.setLineItemValue('expense', 'custcol2',recordLine, 'T');
\t recTransaction.setLineItemValue('expense', 'custcol_date_reconciled',recordLine, date1);
\t nlapiSubmitRecord(recTransaction);
\t //recTransaction.setLineItemValue('expense', 'custcol4', recordLine, periodReconcile);
\t num++;
\t }
非常感谢您的帮助 - 我在这个非常新!
你能展示更多代码吗? I.E.你的搜索是什么样的?如果你只加载4-5条记录,并怀疑每次迭代使用30个单位,我不明白你是如何达到1000的限制。 – 2015-04-03 16:25:54