0
votes

im testing out an after submit event on a matrix item.

I can see in my logs its reporting as an inventory item, however there is no internal ID unlike all the other records I have tested this against.

function afterSubmit(type)
{
  var recType       = nlapiGetRecordType();
  var recId         = nlapiGetRecordId();
  dLog('matrix id',recId);
}

recId is always blank.... dLog() is a function we use to make it easier to log to the netsuite log files

2

2 Answers

0
votes

I see nothing wrong. I tried that on a matrix item myself and worked fine. I suggest checking dLog or using normal debug statements.

0
votes

It will not give record id on aftersubmt.. because items are created after the click of 'create matrix items'. Matrix items does not support aftersubmit event. If want to do scripting on matrix items, you have to write a scheduled script.