Discussions
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Creating Matrix Item
Does anyone have succeeded to create Matrix Parent and Child Item by script?
Recently, I have tried to create Matrix Parent Item.
First of all, set values on 'itemid', 'displayname' fields and set 'matrixtype' field as 'PARENT'.
For mandatory fields, set 'cogsaccount', 'assetaccount', 'taxschedule' fields with suitable values.
After defining the Item's options part, tried to submit parent record using nlapiSubmitRecord function.
But the Execution Log shows such result.
UNEXPECTED_ERROR: null
Is there a way around this?
Thanks,
Xiaoxin
Here is the code snippet.
===============================================
function suitelet(request, response){
var recMatrixParent = nlapiCreateRecord('inventoryitem');
recMatrixParent.setFieldValue('itemid', 'Matrix Parent');
recMatrixParent.setFieldValue('displayname', 'Matrix Parent');