特にフィールド変更機能では、クライアント側スクリプトを使用できます。
このコードは完璧ではありませんが、開始するのに役立つはずです。これを発注書トランザクションに展開したことを確認してください。
function fieldChanged(type, name, linenum){
if(type == 'item' && name == 'item')
{
{
var currIndex = nlapiGetCurrentLineItemIndex('item'); //Get the current index, this is the total count of line items in the transaction
if(currIndex > 1) //You have to have at least two line items to be able to refer to the previous line item
{
var prev = currIndex - 1;
var itemNo = nlapiGetLineItemValue('item', 'item', prev); //This it the item number from the previous line item..Do whatever you want from here....
}
}
}
}