Add new comment

I've made an attempt to create an ItemFulfillmentPackageList and ItemFulfillment via a Suitelet, but received the following error message.

Error: INVALID_RCRD_TYPE
The record type [ITEMFULFILLMENTPACKAGELIST] is invalid.

Here is the code snippet I used to create the records:

var filters = new Array();
filters[0] = new nlobjSearchFilter('tranId', null, 'is', '123');

var columns = new Array();
columns[0] = new nlobjSearchColumn( 'internalId' );
columns[1] = new nlobjSearchColumn( 'entity' );

var searchresults = nlapiSearchRecord( 'salesorder', null, filters, columns );
if (searchresults != null && searchresults != '') {
// We found an internal ID of the sales order, so this record must exist.
var orderInternalId = searchresults[0].getValue("internalId");

// Create a ItemFulfillmentPackageList Record
var ifpl = nlapiCreateRecord('itemfulfillmentpackagelist');
ifpl.setFieldValue('packageTrackingNumber', '1Z0000000000000000');
var ifpl_id = nlapiSubmitRecord(ifpl, true);

// Now, Create a ItemFulfillment Record
var iff = nlapiCreateRecord('itemfulfillment');
iff.setFieldValue('createdate', '2012-07-01');
iff.setFieldValue('entity', orderInternalId);
iff.setFieldValue('packagelist', ifpl_id);

nlapiSubmitRecord(iff, true);

Any idea why this is failing? Thanks.

By aladar

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.