thatguymikeneal
05/10/2018, 6:52 PMvar parent = nlapiCreateRecord('noninventoryitem');
parent.setFieldValue('matrixtype', 'PARENT');
parent.setFieldValue('itemid', 'aaa test');
parent.setFieldValue('subsidiary', 2);
parent.setFieldValue('taxschedule', 4);
parent.setFieldValue('custitem3', 23);
var parentid = nlapiSubmitRecord(parent);
var child = nlapiCreateRecord('inventoryitem');
child.setFieldValue('matrixtype', 'CHILD');
child.setFieldValue('parent', parentid);
child.setFieldValue('itemid', 'zzz test child');
child.setFieldValue('taxschedule', 4);
child.setFieldValue('matrixoptioncustitem3', 23);
var childid = nlapiSubmitRecord(child);
but it fails on the child submit with Invalid parent reference key and then the id of the parent. any ideas?