0

We have some scripts triggered by user event-create or update. Could someone tell me how to use suitscript to simulate Edit-Save process on NetSuite records.

The following code doesn't trigger other scripts.

function triggerScriptTest() {
nlapiLogExecution('debug','Start!!!');
var record = nlapiLoadRecord('itemfulfillment', 267765);
var itemCount = record.getLineItemCount('item');
nlapiLogExecution('debug','Number of Items',itemCount);
var id = nlapiSubmitRecord(record, true);
nlapiLogExecution('debug','Finished!!!');
}

RhysJ
  • 153
  • 1
  • 3
  • 19

1 Answers1

3

This is because a User Event can't trigger other User Events. You can get around this by loading/saving the record within a Suitelet and calling it from your User Event.

Adolfo Garza
  • 2,966
  • 12
  • 15
  • Hi, Adolfo, thanks for letting me know that. Could you tell me how to load/save the record in a suitlet? Appreciate for your help. – RhysJ Oct 29 '17 at 21:00